OnPlayerStateChange
#1

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
Reply
#2

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.
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)