20.10.2017, 12:03
Quote:
PHP код:
|
can be used like this too
PHP код:
CMD:test(playerid, params[])
{
If(IsPlayerAdmin(playerid))
{
GivePlayerWeapon(playerid, 24, 200)
}
else if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "You're not allowed to use this command");
}
return 1;
}
Quote:
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) { new string[128]; format(string, sizeof(string), "{FF6600}[DBot]: {FFFFFF}Command {FF0000}%s{FFFFFF} not found, Type {FF6600}/cmds {FFFFFF}to see server commands", cmdtext); SendClientMessage(playerid, COLOR_WHITE, string); } else if(success && !IsPlayerAdmin(playerid)) { lastcommand[playerid]=gettime(); } return 1; } |
-Locked