[HELP]Check in Players' files - 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: [HELP]Check in Players' files (
/showthread.php?tid=417310)
[HELP]Check in Players' files -
Saw® - 20.02.2013
Hey , I'm registering players' stats as variables (I save those variables in disconnection) , but how to get players' chosen variable when they're disconnected? Like /accountban [PlayerName] to ban disconnected player.
Код:
NB: I'm using DINI & dcmd
Re: [HELP]Check in Players' files -
Jefff - 20.02.2013
pawn Код:
dcmd_aban(playerid,params[])
{
new LEN = strlen(params);
if(!LEN) SCM(...); // Usage: /aban [PlayerName]
else if(!(2 < LEN < 21)) SCM(...); // PlayerName must be between 3 and 20 characters
else if(!dini_Exists(filename[])) SCM(...); // That account doesnt exists
else{
dini_Set(filename[],"AccBanned","1");
}
return 1;
}
Re: [HELP]Check in Players' files -
Saw® - 20.02.2013
thanks ! gonna try this.
Re: [HELP]Check in Players' files -
Saw® - 20.02.2013
Код:
C:\Documents and Settings\PC\Bureau\DATABASE DE ALAE\SND\ICI\SWAT Vs TERRORISTS Server[TDM]\gamemodes\SVTS.pwn(2412) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PC\Bureau\DATABASE DE ALAE\SND\ICI\SWAT Vs TERRORISTS Server[TDM]\gamemodes\SVTS.pwn(2414) : error 029: invalid expression, assumed zero
line 2414:
pawn Код:
dini_Set(file[],"Banned","1");
line 2412:
pawn Код:
else if(!dini_Exists(file[])) SendClientMessage(playerid,COLOR_CYAN,"Can't find it!"); // That account doesnt exists
Re: [HELP]Check in Players' files -
Jefff - 20.02.2013
pawn Код:
dcmd_aban(playerid,params[])
{
new LEN = strlen(params);
if(!LEN) SCM(...); // Usage: /aban [PlayerName]
else if(!(2 < LEN < 21)) SCM(...); // PlayerName must be between 3 and 20 characters
else{
new str[64];
format(str,sizeof(str),"/Accounts/%s.ini",params);
if(!dini_Exists(str)) SCM(...); // That account doesnt exists
else{
dini_Set(str,"AccBanned","1");
}
}
return 1;
}
Re: [HELP]Check in Players' files -
Saw® - 20.02.2013
thanks a lot ! works great .