/unban
#1

alright, i have fixed unban command for something, cause it use to never unban a player. but i fixed that, but now, the player that gets unbanned, there password changes?
Reply
#2

Need some code to help you.
Reply
#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
#4

What does SavePlayer do?
Reply
#5

saves the player file, i think..
Reply
#6

Quote:
Originally Posted by z-intact
saves the player file, i think..
Well yeah, but it might save the password again or something like that. If so, that's what's causing your problem.
Reply
#7

alright, will try to see if that is it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)