22.01.2011, 06:07
i do like what you say but look at the errors i got now please help!
Код:
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,"ud",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], wString3[128], wString4[128], Name[24]; if(Player[warnID][Warnings] <= 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 Reason: %s",Reason); SendClientMessage(warnID, COLOR_RED, wString3); format(wString4,sizeof(wString4), "You Have WARNED %s(%d) For Reason: %s",Name, warnID, Reason); SendClientMessage(playerid, COLOR_RED, wString4); } else { if(Player[warnID][Warnings] == 3)Kick(warnID); GetPlayerName(playerid,Name,24); format(wString5,sizeof(wString5), "**(ADMIN KICK)** %s(%d) To many admin warnings",Name, warnID); SendClientMessageToAll(COLOR_RED, wString5); format(wString6,sizeof(wString6), "You Have Been WARNED By Admin For Reason: To many admin warnings"); SendClientMessage(warnID, COLOR_RED, wString6); format(wString7,sizeof(wString7), "You Have WARNED %s(%d) For Reason: To many admin warnings",Name, warnID); SendClientMessage(playerid, COLOR_RED, wString7); return 1; }
Код:
C:\Users\MrThift\Desktop\MaxAdmin\filterscripts\MaxAdmin.pwn(841) : warning 209: function "dcmd_warn" should return a value C:\Users\MrThift\Desktop\MaxAdmin\filterscripts\MaxAdmin.pwn(842) : error 010: invalid function or declaration C:\Users\MrThift\Desktop\MaxAdmin\filterscripts\MaxAdmin.pwn(844) : error 010: invalid function or declaration C:\Users\MrThift\Desktop\MaxAdmin\filterscripts\MaxAdmin.pwn(852) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.