Is that possible to unban player ingame?
#1

I'm using this unban command [Godfather edit]


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;
    }
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?
Reply
#2

Theres a way to unban if you got their IP.


Not look for a command like that;
Reply
#3

Do /rcon unbanip xxx.xxx.xxx.xxx
Reply
#4

I'm using The Godfather gamemode, I just want to change the change this:

PlayerInfo[playerid][pLocked] = 1;

to this:
PlayerInfo[playerid][pLocked] = 0;

Using a player name.
Reply
#5

Quote:
Originally Posted by Kartowka
I'm using The Godfather gamemode, I just want to change the change this:

PlayerInfo[playerid][pLocked] = 1;

to this:
PlayerInfo[playerid][pLocked] = 0;

Using a player name.
BUMP.
Reply
#6

Код:
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);
PlayerInfo[playerid][pLocked] = 0; //you didn't ad this anywhere :|
SendRconCommand("reloadbans");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}
Reply
#7

Quote:
Originally Posted by DJDhan
Код:
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);
PlayerInfo[playerid][pLocked] = 0; //you didn't ad this anywhere :|
SendRconCommand("reloadbans");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}
That will just unban the player who types /unban... You need to edit the text file. Doesn't godfather come with dini or similar?
Reply
#8

Quote:
Originally Posted by Blacklite
Quote:
Originally Posted by DJDhan
Код:
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);
PlayerInfo[playerid][pLocked] = 0; //you didn't ad this anywhere :|
SendRconCommand("reloadbans");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}
That will just unban the player who types /unban... You need to edit the text file. Doesn't godfather come with dini or similar?
No, I think it's dudb.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)