SA-MP Forums Archive
How to do this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to do this? (/showthread.php?tid=371620)



How to do this? - Crazyboobs - 23.08.2012

If a player get a minigun then his minigun ammo should be set to 0.
How can i make?


Re: How to do this? - milanosie - 23.08.2012

Something like this should do,

untested, made in midnight while sleepy, but should be working

pawn Код:
SetTimer("MinigunCheck", 2000, true);

forward MinigunCheck();
public MinigunCheck()
{
    foreach(Player, i)
    {
        if(GetPlayerWeapon(i) == 38) SetPlayerAmmo(i, 38, 0);
    }
    return 1;
}



Re: How to do this? - TaLhA XIV - 23.08.2012

DELETED.
LaTe.


Re: How to do this? - Gangster-rocks - 24.08.2012

Quote:
Originally Posted by milanosie
Посмотреть сообщение
Something like this should do,

untested, made in midnight while sleepy, but should be working

pawn Код:
SetTimer("MinigunCheck", 2000, true);

forward MinigunCheck();
public MinigunCheck()
{
    (Player, i)
    {
        if(GetPlayerWeapon(i) == 38) SetPlayerAmmo(i, 38, 0);
    }
    return 1;
}
this is a good point but you have to use foreach include you can down load it from here https://sampforum.blast.hk/showthread.php?tid=92679


Re: How to do this? - MP2 - 24.08.2012

Why not just remove it..?


Re: How to do this? - milanosie - 24.08.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Why not just remove it..?
Thats what I was thinking, but he asked for this so...

I ban players with miniguns
Dont take it, punish them!