Mask Code Saving
#1

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);
Reply
#2

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.
Reply
#3

Anyone help please? Still not saving?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)