Ban reason help
#9

Quote:
Originally Posted by KyNe
Посмотреть сообщение
how,.where can i learn
so as i understand correctly you don't save this reason?
When it isn't saved, you can not get this data. is has to be saved somewhere.

example on saving in y_ini: (requires folder Banishments in scriptfiles)

PHP код:
SaveBanishments(playerid)
{
new 
file[64];
format(filesizeof(file), "Banishments/%s.ini"GetName(playerid));
INI_IntSet(file,"bReason",PlayerInfo[playerid][bReason]);
return 
1;

Onplayerdisconnect:
PHP код:
SaveBanishments(playerid); 
Example on loading it into your script.

PHP код:
new PlayerFile[50];
format(PlayerFile,sizeof(PlayerFile),"Banishments/%s.ini",params);
format(string,sizeof(string),"Name: %s \nID:%d was auto kicked. \nReason: %s \n",PlayerName,playerid,INI_Get(PlayerFile,"bReason")); 
Reply


Messages In This Thread
Ban reason help - by KyNe - 05.01.2018, 10:04
Re: Ban reason help - by Hunud - 05.01.2018, 10:07
Re: Ban reason help - by KyNe - 05.01.2018, 10:11
Re: Ban reason help - by iLearner - 05.01.2018, 10:21
Re: Ban reason help - by jlalt - 05.01.2018, 10:36
Re: Ban reason help - by KyNe - 05.01.2018, 10:55
Re: Ban reason help - by jasperschellekens - 05.01.2018, 12:24
Re: Ban reason help - by KyNe - 05.01.2018, 12:31
Re: Ban reason help - by jasperschellekens - 05.01.2018, 12:42

Forum Jump:


Users browsing this thread: 2 Guest(s)