04.09.2010, 15:46
(
Последний раз редактировалось Cypress; 04.09.2010 в 16:18.
)
Okay. here i made a anti db only for 1 weapon, M5.
I did so when a player enter to any vehicle as driver his weapon ammo will go to 0 (-30 ingame)
So when player exit from vehicle he loses he's weapon. I want to get the player weapon back and he's ammo too.
How to give him the weapon back with ammo that he had before incar?
How to use Use GetPlayerWeaponData ? Make it for me
I did so when a player enter to any vehicle as driver his weapon ammo will go to 0 (-30 ingame)
So when player exit from vehicle he loses he's weapon. I want to get the player weapon back and he's ammo too.
pawn Код:
new WeaponId;
new ammo;
if((newstate == PLAYER_STATE_DRIVER))
{
for(new i=0;i<11;i++)
{
if(GetPlayerWeapon(playerid) == 29)
{
GetPlayerWeaponData(playerid, i, WeaponId, ammo);
SetPlayerAmmo(playerid, 29, 0);
}
}
}
if((newstate == PLAYER_STATE_ONFOOT) && ((oldstate == PLAYER_STATE_DRIVER)))
{
GivePlayerWeapon(playerid,29, ammo);
}
return 1;
}
How to use Use GetPlayerWeaponData ? Make it for me