is player in car
#1

Hi i would like to know how i can make it that if they choose this list from a dialog they have to be in a car if they car not it sends a message telling them to get in a car first.

Many thanks

Код:
   if(listitem == 0)
{
    SetPlayerRaceCheckpoint(playerid, 0, -1795.0421, 1103.3732, 45.0752, -1930.9707, 1076.5671, 50.9935, 100);
    Sfrace[playerid] = 1; // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
	SetPlayerPos(playerid,-1715.7688,1103.5144,45.2969);
    SendClientMessage(playerid, 0xFFFFFFFF, "You Start The San Ferrio Street Race Challange. Please follow the checkpoints");
    Sfracetimer = SetTimer("TimedCountdown", 1000, true);
    return 1;
}
Reply
#2

pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You have to be in a vehicle!");
Reply
#3

Код:
 if(listitem == 0)
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You have to be in a vehicle!");
    SetPlayerRaceCheckpoint(playerid, 0, -1795.0421, 1103.3732, 45.0752, -1930.9707, 1076.5671, 50.9935, 100);
    Sfrace[playerid] = 1; // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
	SetPlayerPos(playerid,-1715.7688,1103.5144,45.2969);
    SendClientMessage(playerid, 0xFFFFFFFF, "You Start The San Ferrio Street Race Challange. Please follow the checkpoints");
    Sfracetimer = SetTimer("TimedCountdown", 1000, true);
    return 1;
}
so just like that?
Reply
#4

Yes. Just like that.
Reply
#5

edited DOne it thanks everyonefor your help and ive reped who it will let me rep.
Reply
#6

SetVehiclePos(GetPlayerVehicleID(playerid),-1715.7688,1103.5144,45.2969);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)