SA-MP Forums Archive
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: OnPlayerStateChange (/showthread.php?tid=657869)



OnPlayerStateChange - playstores - 16.08.2018

I used

Quote:

if(oldstate == PLAYER_STATE_ONFOOT && newstate == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 230.8787,184.3384,1003.0313))
{
SendClientMessage(playerid,-1,"hi");
}
}

and

Quote:

if(newstate & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 230.8787,184.3384,1003.0313))
{
SendClientMessage(playerid,-1,"hi");
}
}

But I get no message I am surely near the place


Re: OnPlayerStateChange - KinderClans - 16.08.2018

Are you serious? What is newstate == KEY_SECONDARY_ATTACK?

What a newstate function (driver/passenger) has to do with KEY_SECONDARY_ATTACK (keys)?.

Use the key check just on OnPlayerKeyStateChange, in NO WAY your code will ever work.


Re: OnPlayerStateChange - playstores - 17.08.2018

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
Are you serious? What is newstate == KEY_SECONDARY_ATTACK?

What a newstate function (driver/passenger) has to do with KEY_SECONDARY_ATTACK (keys)?.

Use the key check just on OnPlayerKeyStateChange, in NO WAY your code will ever work.
idiot