SA-MP Forums Archive
Stun system feature (quick question) - 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: Stun system feature (quick question) (/showthread.php?tid=415521)



Stun system feature (quick question) - ToySoldier - 13.02.2013

How can i edit the types of weapons i want it to have this paralisation effect ?

Код:
// Script de Stun
// Paralisaзгo por Golpe com armas especificadas
//
#define FILTERSCRIPT
#include <a_samp>

forward stun(playerid);

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{	
    if (weaponid == 0)// RIGHT HERE, HOW CAN I PUT MORE WEAPON'S IDS HERE ?
    {
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("stun", 2000, false, "d", playerid);//Esses 2000 sгo 2 seg, pode ser modificado
    }
}



public stun(playerid)
{
    TogglePlayerControllable(playerid, 1);
    return 1;
}
i've tried to put a array and use the operators, but none has worked.

This code as it is, just the fist has this effect


Re: Stun system feature (quick question) - S0n1COwnsYou - 13.02.2013

if (weaponid == 0 || weaponid == 1)


Re: Stun system feature (quick question) - ToySoldier - 13.02.2013

it worked.

thx man. s2