IsPlayerInVehicle
#1

Hi,

How could i made example of IsPlayerInVehicle

Example

CMD:work

bla bla

You are not inside truck

bla bla
Reply
#2

PHP код:
if(!IsPlayerInAnyVehicle(playerid)) // If the player is not in any vehicle
if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 411// If the player is not in Infernus for example 
Reply
#3

Thanks +REP He he
Reply
#4

How i can do it on command this when im not inside this it will say you are not inside this car

Quote:

CMD:working(playerid, params[])
{
if( posaosmetlar[ playerid ] != 0 ) return SendClientMessage( playerid, -1, "You are already in work place!" );
SetPlayerCheckpoint(playerid, 2328.3623,-1989.4958,14.0952, 3.0);
TextDrawShowForPlayer(playerid, mywork[playerid]);
TextDrawShowForPlayer(playerid, mywork1[playerid]);
CP[playerid] = 1;
SetTimer("romming", 10000, false);
}
return 1;
}

Reply
#5

add this
Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "you are not inside a car");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)