SA-MP Forums Archive
Unban Command? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unban Command? (/showthread.php?tid=473085)



Unban Command? - Blackazur - 01.11.2013

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?


Re: Unban Command? - Patrick - 01.11.2013

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.


Re: Unban Command? - Beckett - 01.11.2013

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


AW: Unban Command? - Blackazur - 01.11.2013

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

Quote:

pInfo[targetid][pBanned] = 0;




Re: Unban Command? - Patrick - 01.11.2013

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;
}



Re: Unban Command? - gtakillerIV - 01.11.2013

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

You could check my tutorial.