Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //LEANS TAZER SYSTEM
- #include <a_samp>
- #include <zcmd>
- #include <ssacanf2>
- new Taser[MAX_PLAYERS];
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
- {
- ///////////////////////////////////////////////////////////////////////////
- //LEANS TASER SYSTEM//////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
- if(Taser[issuerid] == 1) //Here, issueId is the shooter, NOT THE TARGET.IF TASER IS ISSUED
- if(weaponid == 23) //This checks if weapon silenced is being used!
- {
- new sendername[MAX_PLAYER_NAME], issuername[MAX_PLAYER_NAME], string[128];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- sendername[strfind(sendername,"_")] = ' ';
- issuername[strfind(issuername,"_")] = ' ';
- GetPlayerName(issuerid, issuername, sizeof(issuername));
- format(string, 128, "SERVER: You was hit by %s with a taser!", issuername);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, 128, "SERVER: You hit %s with your taser!", sendername);
- SendClientMessage(issuerid, COLOR_YELLOW, string);
- LoopingAnim(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0); // Sets the player in a flipped animation if hit by a taser
- format(string, sizeof(string), "* %s was hit by a taser and falls on the ground.", sendername); //Send message that target was hit by a tazer.
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- return 1;
- }
- ///////////////////////////////////////////////////////////////////////////
- //LEANS TASER SYSTEM//////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
- //NOT INCLUDING THE REST SEEING AS ITS A PRIVATE DAMAGE SYSTEM. Ty ty krisk
- //////////////////////////////////////////////////
- //TAZER SYSTEM BY LEAN//
- //////////////////////////////////////////////////
- CMD:taser(playerid, params[])
- {
- if(Taser[playerid] == 0) //IF TASER IS NOT ISSUED
- {
- new sendername[MAX_PLAYER_NAME], string[128];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- sendername[strfind(sendername,"_")] = ' '; //removes the _ in the name
- Taser[playerid] = 1; //SETS THE TASER ISSUED
- GivePlayerWeapon(playerid, 23, 20); //GIVES A SILENCER TO PLAYERID!
- format(string, sizeof(string), "* %s unholsters his taser", sendername); //sends a message
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); //sends message to a radius of 30.
- }
- else //IF TASER IS ISSUED WE NOW WANT TO NOT ISSUE IT INSTEAD DISABLE IT.
- {
- new sendername[MAX_PLAYER_NAME], string[128];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- sendername[strfind(sendername,"_")] = ' ';
- Taser[playerid] = 0; //this makes the taser not issued, next time when writing /taser it is issued.
- GivePlayerWeapon(playerid, 24, 1500); //Gives the target back his Desert Eagle
- format(string, sizeof(string), "* %s holsters his taser", sendername); //Sends a message informing that playerid issued his taser.
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); //sends the message above to a radious of 30.
- }
- return 1;
- }
- //////////////////////////////////////////////////
- //TAZER SYSTEM BY LEAN//
- //////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement