25.11.2009, 21:46
Hello everyone.
I had a simple ban system with Ban(playerid);
Also I have pInfo where is pLocked.
Its taking too much my time to unban all those IPs, so I made /sban command, where player Info sets to pLocked = 1;
And after that Server kicks player. When hes trying to connect with this account, he cant. Server shows than account is locked and kick him. He can create new account with that IP so theres no problem. But I dont know how to unlock that player when hes not connected.
Heres my /unban command, but I dont know how to include, than it change pLocked = 1 to 0, so player can come back and play with same account.
Thanks.
I had a simple ban system with Ban(playerid);
Also I have pInfo where is pLocked.
Its taking too much my time to unban all those IPs, so I made /sban command, where player Info sets to pLocked = 1;
And after that Server kicks player. When hes trying to connect with this account, he cant. Server shows than account is locked and kick him. He can create new account with that IP so theres no problem. But I dont know how to unlock that player when hes not connected.
Heres my /unban command, but I dont know how to include, than it change pLocked = 1 to 0, so player can come back and play with same account.
Код:
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, "AdmWarning: %s has unbanned %s", sendername, tmp); ABroadCast(COLOR_YELLOW,string,1); format(string, 256, "AdmWarning: %s has unbanned %s", sendername, tmp); 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; }