Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:armX, Float:armY, Float:armZ)
- {
- if (ArmaCuGloante(weaponid))
- {
- if(Wounded[hitid] == 0)
- {
- if(GetPlayerAmmo(playerid) <= 1)
- {
- SafeGivePlayerWeapon(playerid, weaponid, 1);
- ClearAnimations(playerid);
- LoopingAnim(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
- return 0;
- }
- else
- {
- if (hittype == 1)
- {
- if(weaponid == 23 && CopOnDuty[playerid] == 1 && PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pFaction] == 10)
- {
- ApplyAnimation(hitid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- TogglePlayerControllable(hitid, 0);
- SetTimerEx("StopAnim", 30000, 0, "d",hitid);
- PlayerActionMessage(hitid,15.0,"a fost lovit de pinii tazerului si a cazut la pamant.");
- return 0;
- }
- else if(weaponid == 25 && BeanBag[playerid] == 1 && PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pFaction] == 10)
- {
- LoopingAnim(hitid,"PARACHUTE","FALL_skyDive_DIE",3.5,0,0,0,1,0);
- TogglePlayerControllable(hitid, 0);
- SetTimerEx("StopAnim", 15000, 0, "d",hitid);
- PlayerActionMessage(hitid,15.0,"a fost lovit cu gloatele de cauciuc si a cazut la pamant.");
- return 0;
- }
- }
- }
- }
- else
- {
- return 0;
- }
- }
- if(strcmp(cmd, "/tazer", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pFaction] == 3)
- {
- if(CopOnDuty[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "Nu esti duty.");
- return 1;
- }
- if(JustTazed[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Nu poti pune asa repede electrosocul inapoi.");
- return 1;
- }
- if(TazerActive[playerid] == 1)
- {
- TazerActive[playerid] = 0;
- PlayerInfo[playerid][pEagle] = 1;
- SafeGivePlayerWeapon(playerid, 24, 700);
- JustTazed[playerid] = 1;
- SetTimerEx("TazeReset", 5000, false, "i", playerid);
- SetPlayerChatBubble(playerid,15.0,"pune taserul in suport");
- }
- else
- {
- PlayerInfo[playerid][pSilenced] = 1;
- SafeGivePlayerWeapon(playerid, 23, 20);
- TazerActive[playerid] = 1;
- SetPlayerChatBubble(playerid,15.0,"duce mana dreapta la nivelul curelei de utilitati apucand un taser de tip LE x26.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Factiune invalida.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/beanbag", true) == 0 || strcmp(cmd, "/rubberbullets", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pFaction] == 3)
- {
- if(CopOnDuty[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "Nu esti duty.");
- return 1;
- }
- if(GetPlayerWeapon(playerid) == 25)
- {
- if (BeanBag[playerid] == 0)
- {
- BeanBag[playerid] = 1;
- SetPlayerChatBubble(playerid,15.0,"duce mana dreapta la nivelul curelei de unde apuca gloantele de cauciuc dupa care le pune in shotgun.");
- }
- else
- {
- BeanBag[playerid] = 0;
- SetPlayerChatBubble(playerid,15.0,"scoate gloantele de cauciuc din shotgun.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"Nu ai un shotgun in mana.");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment