SA-MP Forums Archive
[FilterScript] Tear Gas Actions - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Tear Gas Actions (/showthread.php?tid=470150)



Tear Gas Actions - xF4Life - 16.10.2013

It's an Simple tear gas actions i've made for rww but there is no need for that, im currently working on something better, so i can take some of the features i made for rww and release them so.. here is one..



VIDEO:
http://*********/cfGIPYf-Lt0


Code:
// on top of your script
new Anti_Gas[MAX_PLAYERS];

// Onplayerconnect
Anti_Gas[playerid] = 0;

// onplayerdeaths
Anti_Gas[playerid] = 0;

// onplayerspawn
if(Anti_Gas[playerid] == 1)
{
Anti_Gas[playerid] = 0;
}

// It's your tear gas mask, i've removed the attached object (the gas mask)
CMD:buymask(playerid, params[])
{
     if(GetPlayerMoney(playerid) >= 500)
     {
       if(Anti_Gas[playerid] == 0)
         {
           Anti_Gas[playerid] = 1;
           GivePlayerMoney(playerid, - 500);
          }
        }
     return 1;
}


// OnPlayerKeyStateChange
// Tear Gas Actions by xF[4]Life
	    if(newkeys & KEY_FIRE)
         	{
            new weaponid = GetPlayerWeapon(playerid);
            new Float:x, Float:y, Float:z;
			GetPlayerPos(playerid,x,y,z);
       		for(new i = 0; i < MAX_PLAYERS; i++) {
	    if(weaponid == 17)
	     {
	     if(IsPlayerInRangeOfPoint(i,10.0, x, y, z)
              && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        	{
        	if(Anti_Gas[i] == 0)
        	{
	         ApplyAnimation(i, "ped", "gas_cwr", 1.0, 0, 0, 0, 0, 0);
	         GivePlayerWeapon(playerid, 17, -1);
	         }
		    }
		    }
		    }
   		 }
Good Luck.


Re: Tear Gas Actions - Mckarlis - 16.10.2013

nice job.


Re: Tear Gas Actions - iAnonymous - 16.10.2013

Perfect Job !

Always Loved the way You Script


Re: Tear Gas Actions - Plix - 16.10.2013

nice job fx4life , i like it maybe i'll use too


Re: Tear Gas Actions - qazwsx - 17.10.2013

Nice Job Brah


Re: Tear Gas Actions - Krakuski - 17.10.2013

This is really nice, I've been looking for something like this for a while. REP+, Thank you


Re: Tear Gas Actions - DarkLored - 17.10.2013

Very nice fs its a very fun
+REP


Re: Tear Gas Actions - Alphlax - 17.10.2013

Nice script


Re: Tear Gas Actions - iBeast - 17.10.2013

Nice Job :P


Re: Tear Gas Actions - Mark_Samp - 17.10.2013

Good job