15.01.2011, 08:16
When i do this command warn i was need to make it that when its about 2 and under ADMIN WARN and 3 AUTO KICK
so in under when i do
{
else if(warn >=3)
}
i got 3 error Here the errors
so in under when i do
{
else if(warn >=3)
}
i got 3 error Here the errors
Код:
C:\Users\MrThift\Desktop\aa\filterscripts\MaxAdmin.pwn(411) : warning 217: loose indentation C:\Users\MrThift\Desktop\aa\filterscripts\MaxAdmin.pwn(420) : warning 209: function "dcmd_warn" should return a value C:\Users\MrThift\Desktop\aa\filterscripts\MaxAdmin.pwn(421) : error 010: invalid function or declaration C:\Users\MrThift\Desktop\aa\filterscripts\MaxAdmin.pwn(428) : error 010: invalid function or declaration C:\Users\MrThift\Desktop\aa\filterscripts\MaxAdmin.pwn(430) : error 010: invalid function or declaration
Код:
dcmd_warn(playerid, params[]) { new warnID, Reason[128]; if(Player[playerid][admin] < 1) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command"); if(sscanf(params,"ds",warnID, Reason)) return SendClientMessage(playerid, COLOR_RED, "|| Usage: /warn [playerid] [reason] ||"); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!"); new wString1[128], wString2[128], wString3[128], warn, Name[24]; SetPVarInt(warnID, "PlayerWarnings", GetPVarInt(playerid, "PlayerWarnings")+1); if(warn <=2) GetPlayerName(playerid,Name,24); format(wString1,sizeof(wString1), "**(ADMIN WARN)** %s(%d) %s",Name, warnID, Reason); SendClientMessageToAll(COLOR_RED, wString1); format(wString3,sizeof(wString3), "You Have Been WARNED By Admin For: %s",Reason); SendClientMessage(warnID, COLOR_RED, wString3); format(wString2,sizeof(wString2),"%s(%d)(Has Been Forced To Read Rules)",Name,warnID); SendClientMessage(warnID, COLOR_RED, wString2); } else if(warn >=3) { format(wString1,sizeof(wString1), "**(AUTO KICK)** %s(%d) To many admin warnings",Name, warnID); SendClientMessageToAll(COLOR_RED, wString1); format(wString3,sizeof(wString3), "You Have Been WARNED By Admin For: %s",Reason); SendClientMessageToAll(COLOR_RED, wString3); Kick(warnID); return 1; } return 1; }