SA-MP Forums Archive
PlayerInfo Question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PlayerInfo Question (/showthread.php?tid=65383)



PlayerInfo Question - CyberGuerilla - 12.02.2009

Hi, I have a Role Play server. (The Godfather edit) I wanna add weapon save system. I found a script, without dini and dudb.

Before Game Mode Rest. script works. But After, not work.

I must add lines on Onplayerlogin, Onplayerregister and Onplayerupdate.

pGuns[13],
pAmmo[13],

Thats okay. But [13], How can I add [13] on Onplayerupdate etc.

Ex: Onplayerregister and onplayerupdate

format(var, 32, "Guns=%d\n",PlayerInfo[playerid][pGuns]);fwrite(hFile, var);
format(var, 32, "Ammo=%d\n",PlayerInfo[playerid][pAmmo]);fwrite(hFile, var);

And: Onplayerlogin

if( strcmp( key , "Guns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGuns] = strval( val ); }
if( strcmp( key , "Ammo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo] = strval( val ); }

How can I add [13]? If I dont add [13], script dont work.

Sorry for my bad English.. Thank you..


Re: PlayerInfo Question - MenaceX^ - 12.02.2009

Post if in an edited GodFather topic.