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;
}
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. |
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; }
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; } |
Originally Posted by Blacklite
Quote:
|