22.03.2015, 16:04
(11591) : warning 204: symbol is assigned a value that is never used: "amount"
format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid));
COMMAND:skick(playerid, params[]) { new text[128],targetid,string[256],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /skick [playerid] [reason]"); else { if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this."); if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate."); if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin."); if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "You cannot do this to yourself."); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected !"); if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC."); if(GetPVarInt(playerid, "Admin") <= 4 && GetPVarInt(targetid, "Admin") >= 1 && GetPVarInt(targetid, "Admin") <= 10) return SendClientMessage(playerid, COLOR_GREY, "You cant kick admins."); if(GetPVarInt(playerid, "Admin") >= 1) { format(sendername, sizeof(sendername), "%s", AdminName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); if(GetPVarInt(playerid, "Admin") >= 11) sendername = "Hidden"; format(string, sizeof(string), "AdmCmd: %s was kicked by Admin %s Reason:[%s].", giveplayer, sendername, text); SendAdminMessage(COLOR_YELLOW, string); format(string, sizeof(string), "You were silent-kicked for the reason: [%s].", text); SendClientMessage(targetid, COLOR_WHITE, string); SetPVarInt(targetid, "Kicks", GetPVarInt(targetid, "Kicks")+1); KickEx(targetid); } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !"); } } return 1; }