12.02.2009, 09:40
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..
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..