03.09.2012, 11:42
Y_ini help(unban command)
03.09.2012, 11:48
read more tutorials about y_ini , you use it in a completely wrong way
03.09.2012, 11:55
i didn't made that actualy but thank anyway
03.09.2012, 11:55
Dont doble post https://sampforum.blast.hk/showthread.php?tid=374385
03.09.2012, 11:57
sorry guys realy
03.09.2012, 12:00
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;
}
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)