Ban(playerid);
COMMAND:ban(playerid, params[])
{
new string[208 + MAX_PLAYER_NAME],PlayerN[MAX_PLAYERS],OtherN[MAX_PLAYERS];
if(AccountInfo[playerid][AdminLevel] >= 3)
{
new targetid,String[156];
if(sscanf(params,"us", targetid,String)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Ban "WHITE"[playerid] [REASON]");
if(AccountInfo[playerid][AdminLevel] < AccountInfo[targetid][AdminLevel]) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't use this command on A Higher Level Admin Then You!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid PlayerID"RED"(Player Not Connected)!");
if(String[0] <= 4) return SendClientMessage(playerid, COLOR_RED, "Your Reason Needs To Be More Than 4 Characters");
GetPlayerName(playerid,PlayerN,sizeof(PlayerN));
GetPlayerName(targetid,OtherN,sizeof(OtherN));
format(string, sizeof(string), ""BLUE"\"%s\""RED" Was Banned By Admin "BLUE"\"%s\""RED" Reason: %s", OtherN, PlayerN,String);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
printf("\"%s\"Was Banned By Admin \"%s\" Reason %s",OtherN, PlayerN,String);
AccountInfo[playerid][Banned] = 1;
}
else return SendClientMessage(playerid,COLOE_ORANGE,"You "RED"Are Not High Enough "GREEN"level "WHITE"to use this "BLUE"Command");
return 1;
}
?
|
U Sure :0 ??
But i saw some servers make Banned without using Ban(playerid); I can join but when i spawn server kicked me and tell me to go and apply in forum ? |
|
if you make a command, like, /unban [playername] and search trough all player files, and if it finds the name(strfind perhaps?) that it changes the banned = 1 to banned = 0 or something
This is a big thing though.. i won't know how to make it my self, so i think you have to ask some pro scripter for that.. |
|
Yeah thats what i want Exactly if its not possible or Really Hard to make So could i ban for 4 hours with timer ??
|
.|
In you script u use some kind of load for player when they connected to chek value to AccountInfo[playerid][Banned] == 1; if so then you can use a with little change of code to see is the player name banned or not. And to use it for unban when player is of line by playername instead player id.
|