09.12.2014, 23:40
pawn Код:
CMD:namekick(playerid, params[])
{
new playerb, string[128];
new rand = random(sizeof(NamesRP));
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pMapper] < 4 && !PlayerInfo[playerid][pMod]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerb, params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /namekick [playerid]");
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(IsPlayerNPC(playerb)) return SendClientMessage(playerid, COLOR_GREY, "You can't kick NPCs out of the server.");
if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you."); format(string, sizeof(string), "AdmCmd: %s has been kicked by %s (%s), reason: Change your name good example: %s", RPN(playerb), RPN(playerid), NamesRP);
format(string, sizeof(string), "AdmCmd: %s has been kicked by %s (%s), reason: Change your name good example: %s", RPN(playerb), RPN(playerid), NamesRP);
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "AdmCmd: %s has been kicked by %s (%s), reason: Change your name good example: %s", RPN(playerb), RPN(playerid), RPIP(playerid), NamesRP);
Log("logs/kick.log", string);
SetTimerEx("kickbugfix", 500, false, "i", playerb);
return 1;
}
pawn Код:
forward NamesRP();
new NamesRP[][] =
{
"Danny_Williams",
"Nick_Harmold",
"Francisca_Perrotti"
"Hannah_Ress",
"Mathilde_Rhynes",
"Jarod_Otani",
"Dallas_Poppe",
"Russell_Secord",
"Timmy_Taitt",
"Shantel_Golden",
"Lavina_Kilpatrick",
"Janina_Drummond",
"Stephan_Mohan",
"Victor_Lown",
"Chris_Tabler",
"Hung_Pushard",
"Jennefer_Forsyth",
"Tyler_Mitchels"
};
pawn Код:
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(24252) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(24259) : error 076: syntax error in the expression, or invalid function call
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(24260) : error 076: syntax error in the expression, or invalid function call
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(24262) : error 076: syntax error in the expression, or invalid function call
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(24252) : warning 204: symbol is assigned a value that is never used: "rand"
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(36362) : error 001: expected token: ";", but found "-string-"
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(36377) : error 010: invalid function or declaration
C:\Users\Elitebook 8730w\Desktop\Divoro\gamemodes\d-rp.pwn(36378) : warning 203: symbol is never used: "NamesRP"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.