04.06.2016, 16:49
Quote:
This script is just long but some flaws when you shot you will be kicked.
because ammo is not updating in this script. Don't use that script. Well as Example Check this Link http://forum.sa-mp.com/showpost.php?...3&postcount=10 |
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(weaponid == 16)
{
pGrenade[playerid] -= 1;
}
if(weaponid == 17)
{
pTearGas[playerid] -= 1;
}
if(weaponid == 18)
{
pMolotov[playerid] -= 1;
}
if(weaponid == 22)
{
p9mm[playerid] -= 1;
}
if(weaponid == 23)
{
pSlienced9mm[playerid] -= 1;
}
if(weaponid == 24)
{
pEagle[playerid] -= 1;
}
if(weaponid == 25)
{
pShotgun[playerid] -= 1;
}
if(weaponid == 26)
{
pSawnoff[playerid] -= 1;
}
if(weaponid == 27)
{
pCombatShotgun[playerid] -= 1;
}
if(weaponid == 28)
{
pUzi[playerid] -= 1;
}
if(weaponid == 29)
{
pMp5[playerid] -= 1;
}
if(weaponid == 30)
{
pAk[playerid] -= 1;
}
if(weaponid == 31)
{
pM4[playerid] -= 1;
}
if(weaponid == 32)
{
pTec9[playerid] -= 1;
}
if(weaponid == 33)
{
pRifle[playerid] -= 1;
}
if(weaponid == 34)
{
pSniper[playerid] -= 1;
}
if(weaponid == 35)
{
pRpg[playerid] -= 1;
}
if(weaponid == 36)
{
pRocket[playerid] -= 1;
}
if(weaponid == 37)
{
pFlame[playerid] -= 1;
}
if(weaponid == 38)
{
pMinigun[playerid] -= 1;
}
if(weaponid == 39)
{
pSatchel[playerid] -= 1;
}
if(weaponid == 40)
{
pDetonator[playerid] -= 1;
}
if(weaponid == 41)
{
pSpray[playerid] -= 1;
}
if(weaponid == 42)
{
pExtinguisher[playerid] -= 1;
}
if(weaponid == 43)
{
pCamera[playerid] -= 1;
}
return 1;
}