SA-MP Forums Archive
GetPlayerTargetPlayer id in vehicle - 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: GetPlayerTargetPlayer id in vehicle (/showthread.php?tid=547512)



GetPlayerTargetPlayer id in vehicle - Banditukas - 23.11.2014

Hi,

It'is possible to get target player id when he is in vehicle? or this function automatic do this?


Re: GetPlayerTargetPlayer id in vehicle - Fel486 - 23.11.2014

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new check[128];
        format(check, sizeof(check), "PlayerID %d is now on a vehicle", playerid);
        SendClientMessageToAll(-1, check);
    }
    return 1;
}