Loading players weapons
#1

Hey,

I am trying to load a players weapons however I cannot figure out how could someone show me the way it's done? I use MySQL for my file saving.

Thanks,

-Snowman
Reply
#2

Do you exactly make weapons save on disconnect? if so under your onplayerdisconnect add
pawn Code:
format(query,sizeof(query),"UPDATE acc SET Weapon1 = %d",GetPlayerWeapon(playerid));
mysql_query(playerid);
you must have some strval field on player log so something like
pawn Code:
PlayerData[playerid][Weapon1] = strval(field[0]);
and onplayerspawn
pawn Code:
GivePlayerWeapon(playerid,PlayerData[playerid][Weapon1],5000);
hope you get me xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)