Help me please create a command...
#1

Hello. I have a Race FS. So when player choose race, fs tp him to the 1 checkpoint. If player sits in the car, it tp him with the car, but if player i'snt in a vehicle, it don't tp him, just shows him where is the checkpoint... So can anybody help me what command i need to create that if player will be in a vehicle... it will tp, and if he do no sit in a vehicle, it still will tp him...
Here is the commad
#if defined TELEPORT_TO_START
SetVehiclePos(GetPlayerVehicleID(playerid),Checkpo intGara[listitem][0][CXPos],CheckpointGara[listitem][0][CYPos],CheckpointGara[listitem][0][CZPos]);
SendClientMessage(playerid,BIANCO,"[Ãîíêà:] Âû çàøëè íà ãîíêó. Ââåäèòå \"{C14124}/Ready{FFFFFF}\" êîãäà âû áóäåòå ãîòîâû.");
SendClientMessage(playerid,BIANCO,"[Ãîíêà:] ×òîáû âûéòè ñ ãîíêè ââåäèòå \"{C14124}/quitrace{FFFFFF}\"");
#else
SendClientMessage(playerid,BIANCO,"[Ãîíêà:] You join the race. Go to the checkpoint and type \"{C14124}/Ready{FFFFFF}\" when you are ready");
#endif
Reply
#2

I know the code now...
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid),Checkpo intGara[listitem][0][CXPos],CheckpointGara[listitem][0][CYPos],CheckpointGara[listitem][0][CZPos]);
}
else
{
SetPlayerPos(playerid,CheckpointGara[listitem][0][CXPos],CheckpointGara[listitem][0][CYPos],CheckpointGara[listitem][0][CZPos]);
}
Reply
#3

First of all we arent macines so we can read it wrap it in [pawn]

Like this
pawn Код:
I know the code now...
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid),Checkpo intGara[listitem][0][CXPos],CheckpointGara[listitem][0][CYPos],CheckpointGara[listitem][0][CZPos]);
}
else
{
SetPlayerPos(playerid,CheckpointGara[listitem][0][CXPos],CheckpointGara[listitem][0][CYPos],CheckpointGara[listitem][0][CZPos]);
}
Do the same thing with other also so its readable.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)