16.05.2010, 18:58
I'm using this unban command [Godfather edit]
It won't unban the player, but remove his account.
Is there a way to change the player's pLocked to 1 using his name?
pawn Код:
if (strcmp(cmd, "/unban", true)==0)
{
if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unban [PlayerName_PlayerLastName]");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(giveplayer));
format(string, 256, "[AdminWarning] %s has unbanned %s", sendername, tmp);
ABroadCast(COLOR_YELLOW,string,1);
printf(string);
format(string,sizeof(string),"users/%s.ini",tmp);
fremove(string);
SendClientMessage(playerid, COLOR_WHITE, "Player unbanned");
SendRconCommand(string);
SendRconCommand("reloadbans");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}
Is there a way to change the player's pLocked to 1 using his name?