Car Shop Spawning !!
#1

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;
    } 
Reply
#2

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.
Reply
#3

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.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)