Driver ID - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Driver ID (
/showthread.php?tid=278681)
Driver ID -
SpankMe2 - 23.08.2011
Guys,
I need your help I need to know is there a way to get the ID of the driver of a car
Is it possible to do it with a plugin or somthing or somthing already in the coding?
Thnaks
Re: Driver ID -
Davz*|*Criss - 23.08.2011
Try something like this:
pawn Code:
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, -1, "You're car driver.");
}
}
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, -1, "You're not car driver.");
}
}
Re: Driver ID -
CyNiC - 23.08.2011
https://sampforum.blast.hk/showthread.php?tid=271321
Re: Driver ID -
SpankMe2 - 23.08.2011
Quote:
Originally Posted by Davz*|*Criss
Try something like this:
pawn Code:
new vehicleid = GetPlayerVehicleID(playerid); new State = GetPlayerState(playerid); if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SendClientMessage(playerid, -1, "You're car driver."); } } if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SendClientMessage(playerid, -1, "You're not car driver."); } }
|
Thanks just what i needed