09.10.2016, 16:58
(
Последний раз редактировалось Konstantinos; 09.10.2016 в 18:51.
)
Quote:
I have a question: how can I disable commands, like let's say I don't want players that are not logged in to use any commands. With ZCMD I could do it with OnPlayerCommandReceived, but I just found that this include doesn't have OnPlayerCommandReceived and I can't do it with OnPlayerCommandPerformed.
|
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
#if defined OnPlayerCommandReceived
if (!OnPlayerCommandReceived(playerid, cmdtext)) return 1;
#endif
...
}
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if (!gPlayer_LoggedIn[playerid]) return 0;
return 1;
}
Something last I forgot:
pawn Код:
#if defined OnPlayerCommandReceived
forward OnPlayerCommandReceived(playerid, cmdtext[]);
#endif