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



PLAYER_STATE_NONE question - v1k1nG - 29.09.2018

Does
Код:
PLAYER_STATE_NONE
refer to a idling player too?


Re: PLAYER_STATE_NONE question - TheToretto - 29.09.2018

PHP код:
CMD:state(playeridparams[])
{
    if(
GetPlayerSpecialAction(playerid) == PLAYER_STATE_NONE)
    {
        
SendClientMessage(playerid, -1"GetPlayerSpecialAction == true ye");
    }
    else 
SendClientMessage(playerid, -1"It isn't");
    return 
1;

Outputs 'GetPlayerSpecialAction == true ye'


Re: PLAYER_STATE_NONE question - Undef1ned - 29.09.2018

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
PHP код:
CMD:state(playeridparams[])
{
    if(
GetPlayerSpecialAction(playerid) == PLAYER_STATE_NONE)
    {
        
SendClientMessage(playerid, -1"GetPlayerSpecialAction == true ye");
    }
    else 
SendClientMessage(playerid, -1"It isn't");
    return 
1;

Outputs 'GetPlayerSpecialAction == true ye'
GetPlayerSpecialAction sure of what you do??

https://sampwiki.blast.hk/wiki/Playerstates


Re: PLAYER_STATE_NONE question - TheToretto - 29.09.2018

There are SPECIAL_ACTION_NONE & PLAYER_STATE_NONE, try the script by yourself, but it detects it as a playerstate too, but if you crouch, it won't. Give it a try


Re: PLAYER_STATE_NONE question - Undef1ned - 29.09.2018

"SPECIAL_ACTION_NONE" is one thing, and "PLAYER_STATE_NONE" is another.

PHP код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE)
if(
GetPlayerState(playerid) == PLAYER_STATE_NONE
[1] GetPlayerState
[1.1] Player states

[2] GetPlayerSpecialAction
[2.1] Special Actions


Re: PLAYER_STATE_NONE question - TheToretto - 29.09.2018

I get it, but in the script, it still recognize it as special action.