Unban Command?
#1

Hello, i ban a player so:

Код:
pInfo[targetid][pBanned] = 1;
What must i do now when i will unban him if i set the variable to 0 in the unban command, he isn't unbanned, can someone help me?
Reply
#2

The question is what saving system do you use?, MysQL, SQLite, Y_INI etc..

- This forum requires that you wait 240 seconds between posts. Please try again in 85 seconds.
Reply
#3

Show us the code how you are setting the variable to 0.
Reply
#4

I use Y_INI and i set the variable so to 0:

Quote:

pInfo[targetid][pBanned] = 0;

Reply
#5

This is an example, you just need to edit some of it, then you're done
pawn Код:
CMD:unban(playerid, params[])
{
    new
        name[24], string[128];

    if(sscanf(params, "s[24]", name))
        return SendClientMessage(playerid, grey, "Usage: /unban [playername]");


    if(!fexist(string))
        return SendClientMessage(playerid, red, "Invalid Playerid / Name.");

    new INI:File = INI_Open(Your Path Stock In Here);
    INI_SetTag(File,"Your_Data_Tag");
    INI_WriteInt("Banned", 0);
    INI_Close(File);

    format(string,sizeof(string),"Account unbanned 'Name: %s' ",name), SendClientMessage(playerid, -1, string);
    return 1;
}
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=388612

You could check my tutorial.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)