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 |
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;
}
Minigun[playerid] = GetPlayerAmmo(playerid);
First You need to know only some weapon who shot are called at OnPlayerWeaponShot
Like 22,23,24,25,26,27,28,29,30,31,32,33,34,38; You're decreasing ammo of weapons under OnPlayerWeaponShot well some weapons shot lot of amo at time like shotgun uzi swan mp5 you will get kicked ! UnderOnPlayerWeaponShot i think that is better Код:
Minigun[playerid] = GetPlayerAmmo(playerid); |
if(GetPlayerAmmo(playerid) != pMinigun[playerid])
so if it doesn't match, you get kicked |
by UltraScripter |
I don't mean to insult, but that user isn't exactly known for quality scripts and this is a prime example of a very poor and unmaintainable script. I suggest using a completely other script, made by someone else.
|