SA-MP Forums Archive
Car Shop Spawning !! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car Shop Spawning !! (/showthread.php?tid=542873)



Car Shop Spawning !! - Crazydriver - 22.10.2014

Hey guys i have this code it dosn't spawn a vehicle in the given co-ordinates it does deduct the money but nothing else happen let me know the error?

PHP код:
if(strcmp(text"1"true) == && UserStats[playerid][Spawned] == && ActiveMenu[playerid][BoatShop1] == 1//
    
{
        if(
RecentPurchasedCar[playerid] >= 1) { SendClientMessage(playerid,COLOR_RED,"You Have Recently Purchased A Vehicle, Please Wait."); return 0; }
        if(
PlayerCash[playerid] < 15000) { SendClientMessage(playerid,COLOR_RED,"You Do Not Have Enough Money To Buy A Dinghy!"); return 0; }
        
SendClientMessage(playerid,COLOR_YAY,"You Have Purchased A Dinghy For $15000 From Boat Shop, Enjoy!");
        
PlayerCash[playerid] -= 15000;
        
GameTextForPlayer(playerid,"~w~Purchased A ~p~Dinghy",5000,4);
        new 
vehicle;
        
vehicle CreateVehicle(4731638.9403,580.1939,-0.5031,177.0388, -1, -1, -1);
        
BoughtVehicle[vehicle] = 1;
        
RecentPurchasedCar[playerid] = 60;
        
HideBox(playerid);
        return 
1;
    } 



Re: Car Shop Spawning !! - Kitten - 22.10.2014

Try
Код:
vehicle = CreateVehicle(473, 1638.9403 ,580.1939,-0.5031, 177.0388, -1, -1, 0);
Your could should be working, but what I believe is because you set the respawn delay to -1, p.s you got to set the vehicle variable per player, and not local.


Re: Car Shop Spawning !! - Crazydriver - 22.10.2014

Not working still !!

and what do you mean by this
Quote:

p.s you got to set the vehicle variable per player, and not local.