CMD:unban(playerid,params[])
{
new name[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 5) return 0;
if(sscanf(params,"s[MAX_PLAYER_NAME]",name)) return SendClientMessage(playerid, -1, "Usage: /unban [player name]");
if(strlen(name) > 24) return SendClientMessage(playerid, red, "The Player Name Must Be Less Than 60 Characters Long.");
new string[98];
format(string,sizeof(string),"/Users/%s.ini",name);
new IsBanned;
new INI:File = INI_Open(UserPath(playerid));
{
INI_Int("Banned");
}
if(IsBanned == 0) return SendClientMessage(playerid, red, "This player account is not banned.");
if(!fexist(string)) return SendClientMessage(playerid, red, "Player account not found, please note the files are CASE SENSITIVE.");
INI_WriteInt(File,"Banned",0);
INI_Close(File);
format(string,sizeof(string),"Player account %s has been unbanned.",name);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string,sizeof(string),"Admin %s has unbanned the player account: %s.",name(playerid),name);
return 1;
}
C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3621 ) : error 017: undefined symbol "INI_Int" C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : error 012: invalid function call, not a valid address C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : warning 215: expression has no effect C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : error 001: expected token: ";", but found ")" C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : error 029: invalid expression, assumed zero C:\Documents and Settings\\Desktop\Cops&Robbers\gamemodes\.pwn(3629 ) : fatal error 107: too many error messages on one line |
INI_Int("Banned");
format(string,sizeof(string),"Admin %s has unbanned the player account: %s.",name(playerid),name);
CMD:unban(playerid,params[])
{
new aname[MAX_PLAYER_NAME];
if(sscanf(params,"s[MAX_PLAYER_NAME]",aname)) return SendClientMessage(playerid, -1, "Usage: /unban [player name]");
if(strlen(aname) > 24) return SendClientMessage(playerid, -1, "The Player Name Must Be Less Than 60 Characters Long.");
new string[98];
format(string,sizeof(string),"/Users/%s.ini",aname);
new IsBanned;
new INI:File = INI_Open(UserPath(playerid));
{
INI_Int("Banned");
}
if(IsBanned == 0) return SendClientMessage(playerid, -1, "This player account is not banned.");
if(!fexist(string)) return SendClientMessage(playerid, -1, "Player account not found, please note the files are CASE SENSITIVE.");
INI_WriteInt(File,"Banned",0);
INI_Close(File);
format(string,sizeof(string),"Player account %s has been unbanned.",aname);
SendClientMessage(playerid, -1, string);
format(string,sizeof(string),"Admin %s has unbanned the player account: %s.",aname[playerid],aname);
return 1;
}
#include <a_samp> #include <YSI\y_ini> #include <sscanf2> #include <zcmd> #include <streamer> #include <irc> #include <gl_common> |
{
INI_Int("Banned");
}
if(sscanf(params,"s[MAX_PLAYER_NAME]",name)
if(sscanf(params,"s[" #MAX_PLAYER_NAME "]",name)