/UNBANNAME error with Y_ini - 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: /UNBANNAME error with Y_ini (
/showthread.php?tid=585231)
/UNBANNAME error with Y_ini -
YoussefHammad - 12.08.2015
im trying to make that when i do /unbanname the "Banned" is set to 0 and player can join , here's the script
Код:
CMD:unbanname(playerid,params[])
{
if(!IsPlayerAnAdmin(playerid,6))return SendClientMessage(playerid,0xFF0000FF,"You're not allowed to use this command!");
new Name[20],string[128],string3[128];
if(sscanf(params,"s",Name))return SendClientMessage(playerid,COL_GREEN,"/unbanname [name]");
format(string,sizeof(string),"You have unbanned %s.",Name);
for(new i=0;i<GetMaxPlayers();i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAnAdmin(i,1))
{
format(string3,sizeof(string3),"A: %s [LEVEL %i] used the UNBANNAME command.",PlayerName(playerid),GetPVarInt(playerid,"Admin"));
SendClientMessage(i,COLOR_ORANGE,string3);
}
}
}
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
format(Name,sizeof(Name),"/Accounts/%s.txt",Name);
INI_WriteInt(File,"Banned",0);
return 1;
}
error: undefined symbol "File"
Re: /UNBANNAME error with Y_ini -
SickAttack - 12.08.2015
After the format:
pawn Код:
new INI:File = INI_Open(Name);
And increase the number of cells the variable has.
pawn Код:
new Name[MAX_PLAYER_NAME + 15]
Re: /UNBANNAME error with Y_ini -
YoussefHammad - 12.08.2015
Quote:
Originally Posted by SickAttack
After the format:
pawn Код:
new INI:File = INI_Open(Name);
And increase the number of cells the variable has.
pawn Код:
new Name[MAX_PLAYER_NAME + 15]
|
Thanks it worked , +Rep