11.12.2014, 03:59
PHP Code:
#include <a_samp>
new WeaponAmmo[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid)
{
new weapons[2];
GetPlayerWeaponData(playerid, 2, weapons[0], weapons[1]);
WeaponAmmo[playerid]=weapons[1];
ResetPlayerWeapons(playerid);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
GivePlayerWeapon(playerid, 24, WeaponAmmo[playerid]);
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(weaponid==24 &&GetPlayerAmmo(playerid)<=7)
{
SetPlayerAmmo(playerid, 24, 100);
}
}