25.04.2014, 22:41
pawn Код:
CMD:unban(playerid,params[]){
if(PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid, red, "ERROR: You must be logged in to use this commands");
if(PlayerInfo[playerid][Level] >= 5) return SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command");
new tname[24],filestring[79];
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unban [playername]");
format(filestring, sizeof(filestring), "/ladmin/users/%s.save", tname);
if(!udb_Exists(tname(filestring)) return SendClientMessage(playerid,red, "The name you've chosen was not found in our database");
CMDMessageToAdmins(playerid,"UNBAN");
if(udb_Exists(tname(filestring)) udb_encode(tname(filestring));
if(dUserINT(tname(filestring)).("banned") == 1) dUserSetINT(tname(filestring)).("banned",0);
new done[128];
format(done, sizeof(done),"Player %s has been unbanned", tname);
SaveToFile("UnBanLog",done);
SendClientMessage(playerid, white,done);
return 1;}
(6629) : error 012: invalid function call, not a valid address
(6629) : warning 215: expression has no effect
(6629) : error 001: expected token: ";", but found ")"
(6629) : error 029: invalid expression, assumed zero
(6629) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Line 6629: if(!udb_Exists(tname(filestring)) return SendClientMessage(playerid,red, "The name you've chosen was not