28.03.2011, 18:25
Quote:
1)
Use printf or SendClientMessage or whatever at the top of OnPlayerCommandText pawn Код:
Use a timer and IsPlayerInRangeOfPoint to detect if a player went to the forbidden zone and teleport him then or use pawn Код:
|
PlayerInfo[pInfo][AdminLevel]
Edit:
i used:
pawn Код:
new commands = 0;
pawn Код:
if(strcmp("/showcommands", cmdtext, true, 12) || strcmp("/sc", cmdtext, true, 2) == 0)
{
if(commands == 0)
{
commands = 1;
SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You can now see the players commands");
}
else
{
commands = 0;
SendClientMessage(playerid, COLOUR_LIGHTBLUE, "now, You can't see the players commands!");
}
return 1;
}
pawn Код:
if(commands == 1 && PlayerInfo[playerid][AdminLevel] <= 2)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(PlayerInfo[i][AdminLevel] >= 3)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[%s]: %s (id:%d)", name, cmdtext[0], playerid);
SendClientMessage(playerid, COLOUR_GREY, string);
}
}