CMD:nameunban(playerid,params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); if(IsPlayerAdmin(playerid)) { new tmp[256], Index; tmp = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /nameunban [name]"); new adminname[MAX_PLAYER_NAME], string[128], unbanname[256]; unbanname = tmp; if(udb_Exists(unbanname)) { dUserSetINT(unbanname).("Banned", 0); GetPlayerName(playerid, adminname, sizeof(adminname)); CMDMessageToAdmins(playerid,"NAMEUNBAN"); SaveToFile("UnBanNameLog",string); SendRconCommand("reloadbans"); print(string); return 1; } else return SendClientMessage(playerid, red, "ERROR: No player with this name."); } else return SendClientMessage(playerid,red,"ERROR: You Need To Be A High Level Admin To Use This Command"); }
CMD:nameunban(playerid,params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); new tmp[256], Index; tmp = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /nameunban [name]"); new adminname[MAX_PLAYER_NAME], string[128], unbanname[256]; unbanname = tmp; if(udb_Exists(unbanname)) { dUserSetINT(unbanname).("Banned", 0); GetPlayerName(playerid, adminname, sizeof(adminname)); CMDMessageToAdmins(playerid,"NAMEUNBAN"); SaveToFile("UnBanNameLog",string); SendRconCommand("reloadbans"); print(string); return 1; } else return SendClientMessage(playerid, red, "ERROR: No player with this name."); }
C:\Users\aiman\Desktop\Server\ADADA\LTFDM.pwn(19421) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Код:
CMD:nameunban(playerid,params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); new tmp[256], Index; tmp = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /nameunban [name]"); new adminname[MAX_PLAYER_NAME], string[128], unbanname[256]; unbanname = tmp; if(udb_Exists(unbanname)) { dUserSetINT(unbanname).("Banned", 0); GetPlayerName(playerid, adminname, sizeof(adminname)); CMDMessageToAdmins(playerid,"NAMEUNBAN"); SaveToFile("UnBanNameLog",string); SendRconCommand("reloadbans"); print(string); return 1; } else return SendClientMessage(playerid, red, "ERROR: No player with this name."); } |
new tmp[256], Index; tmp = strtok(params,Index);
CMD:nameunban(playerid, params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); new tmp[256], Index; tmp = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /nameunban [name]"); new adminname[MAX_PLAYER_NAME], string[128], unbanname[256]; unbanname = tmp; if(udb_Exists(unbanname)) { dUserSetINT(unbanname).("Banned", 0); GetPlayerName(playerid, adminname, sizeof(adminname)); CMDMessageToAdmins(playerid,"NAMEUNBAN"); SaveToFile("UnBanNameLog",string); SendRconCommand("reloadbans"); print(string); return 1; } else return SendClientMessage(playerid, red, "ERROR: No player with this name."); }
Код:
CMD:nameunban(playerid, params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); new tmp[256], Index; tmp = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /nameunban [name]"); new adminname[MAX_PLAYER_NAME], string[128], unbanname[256]; unbanname = tmp; if(udb_Exists(unbanname)) { dUserSetINT(unbanname).("Banned", 0); GetPlayerName(playerid, adminname, sizeof(adminname)); CMDMessageToAdmins(playerid,"NAMEUNBAN"); SaveToFile("UnBanNameLog",string); SendRconCommand("reloadbans"); print(string); return 1; } else return SendClientMessage(playerid, red, "ERROR: No player with this name."); } |
CMD:unban(playerid,params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "ERROR: You are not a high enough level to use this command"); new tmp[256], Index; tmp = strtok(params,Index); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /unban [name]"); new adminname[MAX_PLAYER_NAME], string[128], unbanname[256]; unbanname = tmp; if(udb_Exists(unbanname)) { dUserSetINT(unbanname).("Banned", 0); GetPlayerName(playerid, adminname, sizeof(adminname)); CMDMessageToAdmins(playerid,"UNBAN"); SaveToFile("UnBanNameLog",string); SendRconCommand("reloadbans"); print(string); return 1; } else return SendClientMessage(playerid, red, "ERROR: No player with this name."); }
CMD:unbanip(playerid, params[]) { if(PlayerInfo[playerid][Level] < 5) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); if(IsPlayerAdmin(playerid)) { new integ;if(sscanf(params,"u", integ)) return SendClientMessage(playerid, red, "Usage: /unban [IP: ADDRESS]"); if(integ >=32) return SendClientMessage(playerid, red, "IP ADDRESS IS TOO LONG"); new UnBanIp[80],IpAdd[128];format(UnBanIp,sizeof(UnBanIp),"unbanip %s",integ); SendRconCommand(UnBanIp); format(IpAdd,sizeof(IpAdd),"You Have Unbanned IP: %d",integ); SendClientMessage(playerid,red,IpAdd); } return 1; }
CMD:unbanip(playerid, params[]) { if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red, "You Cant Use This Command !!!"); { new integ;if(sscanf(params,"u", integ)) return SendClientMessage(playerid, red, "Usage: /unban [IP: ADDRESS]"); if(integ >=32) return SendClientMessage(playerid, red, "IP ADDRESS IS TOO LONG"); new UnBanIp[80],IpAdd[128];format(UnBanIp,sizeof(UnBanIp),"unbanip %s",integ); SendRconCommand(UnBanIp); format(IpAdd,sizeof(IpAdd),"You Have Unbanned IP: %d",integ); SendClientMessage(playerid,red,IpAdd); } return 1; }