SA-MP Forums Archive
SQL weapons. - 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)
+--- Thread: SQL weapons. (/showthread.php?tid=352342)



SQL weapons. - iGetty - 19.06.2012

How can I get the ALL of the weapons that a person is carrying? As it's going to be saved into the SQL.


Thanks!


Re: SQL weapons. - Revo - 19.06.2012

Untested;
pawn Код:
new weapons[MAX_PLAYERS][12];
stock GetAllWeapons(playerid)
{
  for(new i=0; i<=12; i++) weapons[playerid][i] = GetPlayerWeapon(playerid);
}
I'm not certain of the max weapons, but this should work o.o


Re: SQL weapons. - ReneG - 19.06.2012

Quote:
Originally Posted by BuuGhost
Посмотреть сообщение
Untested;
pawn Код:
new weapons[MAX_PLAYERS][12];
stock GetAllWeapons(playerid)
{
  for(new i=0; i<=12; i++) weapons[playerid][i] = GetPlayerWeapon(playerid);
}
I'm not certain of the max weapons, but this should work o.o
GetPlayerWeapon only returns the gun the player is holding.

Use GetPlayerWeaponData.