Mask Code Saving - 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: Mask Code Saving (
/showthread.php?tid=563807)
Mask Code Saving -
hhaaoo123 - 17.02.2015
I have made a mask system that when the player type /mask, it will give the player something like this
"Stranger 55555" the problem is when I take off the mask and put it back, the mask name will be changed to another number. Any idea to save the mask name? I did save the "MaskName" , but it's not saving the mask name.
OnPlayerLogin
Код:
if(strcmp(key , "MaskName" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pMaskName], val, 0, strlen(val)-1, 255); }
OnPlayerRegister
Код:
format(var, 32, "MaskName=%d\n",PlayerInfo[playerid][pMaskName]);fwrite(hFile, var);
OnPlayerConnect
Код:
strmid(PlayerInfo[playerid][pMaskName], "None", 0, strlen("None"), 255);
StatsUpdate
Код:
format(var, 32, "MaskName=%d\n",PlayerInfo[playerid][pMaskName]);fwrite(hFile, var);
Re: Mask Code Saving -
Kaperstone - 17.02.2015
First of all, why don't you save it into an array if he already put the mask on once before ? Faster and less load on the server when he tries to put a mask on.
Second, try to print the "PlayerInfo[playerid][pMaskName]" and "var" when he puts the mask on.
then just search for that print on the server console.
if everything is fine, then you're fetching the mask name not correctly.
Re: Mask Code Saving -
hhaaoo123 - 18.02.2015
Anyone help please? Still not saving?