Weapon system
#4

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Something like:

pawn Код:
dini_IntSet(File, "WEAPON", PlayerInfo[playerid][WEAPON] = GetPlayerWeapon(playerid));
I have found the saving shit now.

Now I have:

pawn Код:
new weapons[13][2], Str[30];
for(new i = 0; i < 13; i++)
{
    GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
    format( Str, 30, "Weapon%d", i );
    dini_IntSet(udb_encode(playername), Str, weapons[i][0]);
    format( Str, 30, "Ammo%d", i );
    dini_IntSet(udb_encode(playername), Str, weapons[i][1]);
}
But when a player is comming in the server,
The scriptfile is now looking like weapon0 = ... weapon 1 = ....
You need to do with everyting like GivePlayerWeapon(playerid, weapon0);
Or is there an easier way?
Reply


Messages In This Thread
Weapon system - by jorambo - 15.03.2011, 11:43
Re: Weapon system - by Stigg - 15.03.2011, 12:00
Re: Weapon system - by jorambo - 15.03.2011, 12:10
Re: Weapon system - by jorambo - 15.03.2011, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)