/unban - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /unban (
/showthread.php?tid=127092)
/unban -
TheGtaLover - 11.02.2010
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?
Re: /unban -
Grim_ - 11.02.2010
Need some code to help you.
Re: /unban -
TheGtaLover - 11.02.2010
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.
Re: /unban -
Grim_ - 11.02.2010
What does SavePlayer do?
Re: /unban -
TheGtaLover - 11.02.2010
saves the player file, i think..
Re: /unban -
Grim_ - 11.02.2010
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.
Re: /unban -
TheGtaLover - 11.02.2010
alright, will try to see if that is it.