GetPlayerWeaponData
#3

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
It's pretty straight forward.

slots” is the slot ID the weapon is held in. There are 13 slots, 0 to 12. You loop through these slots and get their weapons and ammo for those slots.
Two examples are:

PHP код:
// Common use: get all weapons and store info in an array containing 13 slots
// The first value is the weapon ID, and second is the ammo
 
new weapons[13][2];
 
for (new 
0<= 12i++)
{
    
GetPlayerWeaponData(playeridiweapons[i][0], weapons[i][1]);

weapons[i][0]” holds their weapon ID and “weapons[i][1]” holds the ammo.

PHP код:
new
    
weapon_idammow_string[128]
;
for(new 
i13i++) // 0-12; 
{
    
GetPlayerWeaponData(playeridiweapon_idammo);
    
    
format(w_stringsizeof w_string"Weapon ID: %i, Ammo: %i"weapon_idammo);
    
SendClientMessage(playerid, -1w_string);

You understandin?
Kinda'. Say, how do you do that with dialogs?
Reply


Messages In This Thread
GetPlayerWeaponData - by NealPeteros - 16.12.2017, 07:50
Re: GetPlayerWeaponData - by Kane - 16.12.2017, 08:21
Re: GetPlayerWeaponData - by NealPeteros - 16.12.2017, 08:28
Re: GetPlayerWeaponData - by Kane - 16.12.2017, 08:33
Re: GetPlayerWeaponData - by RogueDrifter - 16.12.2017, 08:35
Re: GetPlayerWeaponData - by NealPeteros - 16.12.2017, 08:54
Re: GetPlayerWeaponData - by RogueDrifter - 16.12.2017, 09:01
Re: GetPlayerWeaponData - by NealPeteros - 16.12.2017, 09:14
Re: GetPlayerWeaponData - by RogueDrifter - 16.12.2017, 09:19
Re: GetPlayerWeaponData - by Kane - 16.12.2017, 09:26

Forum Jump:


Users browsing this thread: 1 Guest(s)