aaronhance 1 Posted August 17, 2013 I've been making a vehicle spawn script for my mission, but it does not want to work. //vehicle spawn script - by [bB]Aaron if(driversLicense == 1)then{ if((player getVariable "moneyHand") => 300)then{ player setVariabe ["moneyHand", ((player getVariable "moneyHand") - 300)]; _veh = "C_Quadbike_01_F" createVehicle (position player); vehiclelock = _veh addAction ['Unlock / Lock','veh\lock.sqf',[],7,true,true,'','(_target distance _this) < 4']; } else{ hint "You need more money!"; } } else{ hint "You need a license!"; } Share this post Link to post Share on other sites
mikie boy 18 Posted August 17, 2013 close off your brackets }; Share this post Link to post Share on other sites
aaronhance 1 Posted August 17, 2013 Thanks again. :D ---------- Post added at 13:21 ---------- Previous post was at 13:18 ---------- close off your brackets}; The Script still doesn't work. Share this post Link to post Share on other sites
ToxicMuffin 1 Posted August 18, 2013 hey aaron, i noticed that one of the "variable"'s was spelled wrong and also i switched '=>' to '>=', try this and see if it works for you :) hope i could help! if(driversLicense == 1)then{ if ((player getVariable "moneyHand") >= 300) then { player setVariable ["moneyHand", ((player getVariable "moneyHand") - 300)]; _veh = "C_Quadbike_01_F" createVehicle (position player); vehiclelock = _veh addAction ['Unlock / Lock','veh\lock.sqf',[],7,true,true,'','(_target distance _this) < 4']; } else { hint "You need more money!"; }; } else { hint "You need a license!"; }; ~ToxicMuffin Share this post Link to post Share on other sites
aaronhance 1 Posted August 18, 2013 hey aaron, i noticed that one of the "variable"'s was spelled wrong and also i switched '=>' to '>=', try this and see if it works for you :) hope i could help! if(driversLicense == 1)then{ if ((player getVariable "moneyHand") >= 300) then { player setVariable ["moneyHand", ((player getVariable "moneyHand") - 300)]; _veh = "C_Quadbike_01_F" createVehicle (position player); vehiclelock = _veh addAction ['Unlock / Lock','veh\lock.sqf',[],7,true,true,'','(_target distance _this) < 4']; } else { hint "You need more money!"; }; } else { hint "You need a license!"; }; ~ToxicMuffin Thanks, I must have gone over it 5 or 6 times can't believe I missed it. Share this post Link to post Share on other sites