SA-MP Forums Archive
Send Message to player when - 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: Send Message to player when (/showthread.php?tid=263452)



Send Message to player when - Tachibana - 22.06.2011

He enters a vehicle? I was thinking of
pawn Код:
public OnPlayerEnterVehicle
and basically when the player enetrs a vehicle it will send him a text
"To start the engine type /vcontrol" ?


Re: Send Message to player when - marinov - 22.06.2011

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
     SendClientMessage(playerid, YELLOW, "To start the engine type /vcontrol");
     Return 1;
}



Re: Send Message to player when - [L3th4l] - 22.06.2011

Use OnPlayerStateChange

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
        SendClientMessage(playerid, -1, "To start the engine type /vcontrol");
}



Re: Send Message to player when - Tachibana - 22.06.2011

Working thanks!