Help with onplayerstatechange - 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: Help with onplayerstatechange (
/showthread.php?tid=370417)
Help with onplayerstatechange -
CoDeZ - 20.08.2012
Hello guys i have this code here
pawn Код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520) return SendClientMessage(playerid,COLOR_RED,"Debug : Works.");
return 1;
}
but it doesn't send any message why? :/
Re: Help with onplayerstatechange -
Shetch - 20.08.2012
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520)
{
SendClientMessage(playerid,COLOR_RED,"Debug : Works.");
return 1;
}
}
return 1;
}
Re: Help with onplayerstatechange -
CoDeZ - 20.08.2012
thanks mate works now
RP++