Y_ini help(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: Y_ini help(unban command) (
/showthread.php?tid=374566)
Y_ini help(unban command) -
ThePrograme - 03.09.2012
help me with this:
https://sampforum.blast.hk/showthread.php?tid=374385
Re: Y_ini help(unban command) - HuSs3n - 03.09.2012
read more tutorials about y_ini , you use it in a completely wrong way
Re: Y_ini help(unban command) -
ThePrograme - 03.09.2012
i didn't made that actualy but thank anyway
Re: Y_ini help(unban command) -
doreto - 03.09.2012
Dont doble post
https://sampforum.blast.hk/showthread.php?tid=374385
Re: Y_ini help(unban command) -
ThePrograme - 03.09.2012
sorry guys realy
Re: Y_ini help(unban command) -
RanSEE - 03.09.2012
There is nothing on the other thread.
pawn Код:
CMD:unban(playerid,params[])
{
new name[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid) && Player[playerid][Admin] < 7) return SendClientMessage(playerid, white, "ERROR: {FFFFFF}You Have Entered An Invalid Command. Please Read {00FF00}/CMDS{FFFFFF}.");
if(sscanf(params,"s[MAX_PLAYER_NAME]",name)) return SendClientMessage(playerid, white, "SYNTAX ERROR: {00FF00}/UNBAN {FFFF00}<PlayerName>");
if(strlen(name) > 24) return SendClientMessage(playerid, red, "ERROR: {FFFFFF}The Player Name Must Be Less Than 60 Characters Long.");
new string[98];
format(string,sizeof(string),"/Drifting/Users/%s.ini",name);
new IsBanned;
new INI:string["Account Data"](name[],value[])
{
INI_Int("Banned",);
}
if(IsBanned == 0) return SendClientMessage(playerid, red, "ERROR: {FFFFFF}This Player Account Is Not Banned, Please Try Again.");
if(!fexist(string)) return SendClientMessage(playerid, red, "ERROR: {FFFFFF}Player File Does Not Exist, Please Note, Files Are {FFFF00}Case Sensitive{FFFFFF}.");
new INI:File = INI_Open(string);
INI_WriteInt(File,"Banned",0);
INI_Close(File);
format(string,sizeof(string),"Player Account %s Has Been Unbanned.",name);
SendClientMessage(playerid, yellow, string);
format(string,sizeof(string),"Administrator %s Has Unbanned The Player Account: %s.",pName(playerid),name);
return 1;
}