1
mIRC/pawn Scripting / Re: i need commands pawno...
« on: May 04, 2014, 03:48:34 pm »
[pawn]if (strcmp(cmd, "mute", true) == 0) {
if (IsPlayerAdmin(playerid)) {
tmp = strtok(cmdtext, idx);
newvar = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) {
SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c jail <name/id>");
} else {
new string[256];
format(string, 256, "Admin [ %s ] has jailed [ %s ]!", gPlayers[ playerid ], gPlayers[ newvar ]);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(newvar, 0);
}
} else {
SendClientMessage(playerid, RED, " You have not access to use the command!");
}
return 1;[/pawn]
if (IsPlayerAdmin(playerid)) {
tmp = strtok(cmdtext, idx);
newvar = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) {
SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c jail <name/id>");
} else {
new string[256];
format(string, 256, "Admin [ %s ] has jailed [ %s ]!", gPlayers[ playerid ], gPlayers[ newvar ]);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(newvar, 0);
}
} else {
SendClientMessage(playerid, RED, " You have not access to use the command!");
}
return 1;[/pawn]