SA-MP Forums Archive
IsPlayerInVehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IsPlayerInVehicle (/showthread.php?tid=618486)



IsPlayerInVehicle - Hunud - 06.10.2016

Hi,

How could i made example of IsPlayerInVehicle

Example

CMD:work

bla bla

You are not inside truck

bla bla


Re: IsPlayerInVehicle - oMa37 - 06.10.2016

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 



Re: IsPlayerInVehicle - Hunud - 06.10.2016

Thanks +REP He he


Re: IsPlayerInVehicle - Hunud - 06.10.2016

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;
}




Re: IsPlayerInVehicle - lackmail - 06.10.2016

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