Unban and Offban - 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: Unban and Offban (
/showthread.php?tid=318360)
Unban and Offban -
Marusa - 14.02.2012
How to set "Ban=1" or "Ban=0" to offline player?? Using classic fwrite
...
Ban=0
Spawn=0
Pos_x=1692.2
Pos_y=-2237.7
Pos_z=14.6
CarLic=0
FlyLic=0
BoatLic=0
FishLic=0
...
when i using dini_IntSet, then my password does not match
pls help how to do that...
sry for bad English
Re: Unban and Offban -
RicaNiel - 14.02.2012
Try this
Re: Unban and Offban -
Marusa - 14.02.2012
This can not, again, does not recognize password
Re: Unban and Offban -
Marusa - 15.02.2012
BUMP Help someone pls pls :/
Re: Unban and Offban -
Universal - 15.02.2012
First of all, retreive all of the stats into variables, and then change the value of ban variable to 1 and the rewrite it again.
Heres an example:
pawn Код:
// Open your file
new
kills,
deaths,
score,
ban,
string[129];
fread(file, string);
sscanf(string, "dddd", kills, deaths, score, ban);
ban = 1;
format(string, sizeof(string), "%d %d %d %d", kills, deaths, score, ban);
fwrite(file, string);
fclose(file);