/unban
#3

Heres the unban command,
Quote:

if (strcmp(cmd, "/unban", true)==0)
{
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 8 && PlayerInfo[playerid][pRealAdmin] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_PURPLE, "USAGE: /unban [playername]");
return 1;
}
if(!LoadPlayer(playerid,tmp))
{
return 1;
}
if(PlayerInfo[playerid][pSuspended] == 0)
{
SendClientMessage(playerid, COLOR_RED, "That player is not banned!");
return 1;
}
else
{
PLlayerInfo[playerid][plLevel] = PLlayerInfo[playerid][plAdmin];
PlayerInfo[playerid][pSuspended] == 0;
SavePlayer(playerid,tmp);
SendClientMessage(playerid, COLOR_DBLUE, "Player Un-banned");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not authorized to use that command!");
}
return 1;
}

and if you say anything about the indenting.. it doesnt need to be indented, cause the whole script isnt indented.
Reply


Messages In This Thread
/unban - by TheGtaLover - 11.02.2010, 21:57
Re: /unban - by Grim_ - 11.02.2010, 22:09
Re: /unban - by TheGtaLover - 11.02.2010, 22:24
Re: /unban - by Grim_ - 11.02.2010, 23:22
Re: /unban - by TheGtaLover - 11.02.2010, 23:23
Re: /unban - by Grim_ - 11.02.2010, 23:32
Re: /unban - by TheGtaLover - 11.02.2010, 23:54

Forum Jump:


Users browsing this thread: 1 Guest(s)