10.05.2013, 15:59
good job !
CMD:unban(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
new PlayerFile[50],string[128];
format(PlayerFile, sizeof(PlayerFile), "Saves/%s.ini", params);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "/unban [playername]");
if(!dini_Exists(PlayerFile)){SendClientMessage(playerid, COLOR_GREY, "No such player found in the database.");}
else
{
if(dini_Int(PlayerFile,"Banned")==0)return SendClientMessage(playerid,-1,"That Player is already unbanned");
dini_IntSet(PlayerFile, "Banned", 0);
SendClientMessage(playerid, COLOR_WHITE, "Account Unbanned");
format(string,sizeof(string),"unbanip %s",dini_Get(PlayerFile,"IP"));
SendRconCommand(string);
}
}else return 0;
return 1;
}
CMD:ban(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
new PlayerFile[50];
format(PlayerFile, sizeof(PlayerFile), "Saves/%s.ini", params);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "/oban [playername]");
if(!dini_Exists(PlayerFile)) {SendClientMessage(playerid, COLOR_GREY, "No such player found in the database.");}
else
{
if(dini_Int(PlayerFile,"Banned")==1)return SendClientMessage(playerid,-1,"That Player is already banned");
dini_IntSet(PlayerFile, "Banned", 1);
SendClientMessage(playerid, COLOR_WHITE, "Account Banned");}
}else return 0;
return 1;
}
//==============================================================================
CMD:br(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
new PlayerFile[50];
format(PlayerFile, sizeof(PlayerFile), "Saves/%s.ini", params);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "/banreason [playername]");
if(!dini_Exists(PlayerFile)) {SendClientMessage(playerid, COLOR_GREY, "No such player found in the database.");}
if(dini_Int(PlayerFile,"Banned")==1)
{
new str[256];
format(str,sizeof(str),"\"%s\" was banned for \"%s\" by \"%s\"",params,dini_Get(PlayerFile,"Reason"),dini_Get(PlayerFile,"Banner"));
SendClientMessage(playerid, COLOR_WHITE, str);
}else return SendClientMessage(playerid,-1,"That Player is not banned");
}else return 0;
return 1;
}
I am not going to upload new version or upgrade it. Its already bug free.
Score system depends on time played, for instance, 1 hour leads to 1 score, 5 hours lead to 2 scores. |