My car spawning problem.?
#1

I'm using this script:
PHP код:
            new veh;
            
veh CreateVehicle(4152135.12, -2552.6513.559000100000000000000000000000000);
            
PutPlayerInVehicle(playerid,veh,0);
            
SetCameraBehindPlayer(playerid); 
I want to: If he is already in a car, he cant spawn a car and it will say:

SendClientMessage(playerid, 0xFFFFFFFF, "You are already in a car, leave your car to spawn a new one.");
Reply
#2

pawn Код:
if(IsplayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are already in a car, leave your car to spawn a new one.");
}
else
//your stuff
Reply
#3

Thanx!

I have this now:

PHP код:
            new veh4;
            if(
IsPlayerInAnyVehicle(playerid))
            {
            
SendClientMessage(playerid0xFFFFFFFF"You are already in a vehicle, leave your car to spawn a new one.");
            }
            else
            
veh4 CreateVehicle(4112135.12, -2552.6513.559000100000000000000000000000000);
            
PutPlayerInVehicle(playerid,veh4,0);
            
SetCameraBehindPlayer(playerid);
            
SendClientMessage(playerid0xFFFFFFFF"You bought a brand new Infernus!!");
            
GivePlayerMoney(playerid,-2500); 
But i want, when he doesn't have enough money then there will come a message like:
SendClientMessage(playerid, 0xFFFFFFFF, "You don't have enough money for this vehicle!");
Reply
#4

then it could look like this
pawn Код:
if(GetPlayerMoney(playerid, < 50000))
together with the rest ofcourse
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)