Enum Banned ..
#1

Hello every one


i would like to make Banned Command Without Using
pawn Код:
Ban(playerid);
i want Make it with enum like this
pawn Код:
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;
}
But its not the problem . The problem is How to make UnBanned for Not Connected Player ?
Reply
#2

you can't *.*
Reply
#3

Quote:
Originally Posted by kikito
Посмотреть сообщение
you can't *.*
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 ?
Reply
#4

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..
Reply
#5

Quote:
Originally Posted by [D]ry[D]esert
Посмотреть сообщение
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 ?
that bans are saved on a mysql database / files.
You can't use enum.
enum just say that the user is banned, and ban the user/kick the user(if you want to)
Reply
#6

Quote:
Originally Posted by Jari_Johnson*
Посмотреть сообщение
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 ??
Reply
#7

Quote:
Originally Posted by [D]ry[D]esert
Посмотреть сообщение
Yeah thats what i want Exactly if its not possible or Really Hard to make So could i ban for 4 hours with timer ??
Like kikito said, you can use a mysql system for this..
You will spare a lot of time, and it's also a lot faster..
I know it's a little useless if you only use it for bans, but maybe some experienced people know how to make somehthing like this faster than I do .

Not sure if the thing i said before is possible though, you should ask a professional scripter for that.
Reply
#8

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.
Reply
#9

Quote:
Originally Posted by Azazelo
Посмотреть сообщение
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.
How :O Please Example ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)