16.10.2013, 15:07
(
Last edited by xF4Life; 09/02/2014 at 11:37 AM.
)
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
Good Luck.
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); } } } } }