SDPistol Taser
#1

I looked for Pistol Taser, but i didn't find it, do you know, where it is or could you post me this FS?
Reply
#2

Actually it's very easy to make with wups OnPlayerShootPlayer include.
Reply
#3

It can be easy, but im beginner in this
Reply
#4

pawn Code:
OnPlayerCommandText:

if(strcmp(cmd, "/tazer", true) ==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsACop(playerid))
            {
                new x_job[20];
                x_job = strtok(cmdtext, idx);
                if(!strlen(x_job))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tazer [get/putup]");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(strcmp(x_job,"get",true) == 0)
                {
                    PlayerHasTazer[playerid] = 1;
                    SetPlayerAttachedObject(playerid, 0, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
                    format(string, sizeof(string), "* %s unholsters his tazer.", PlayerName(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else if(strcmp(x_job,"putup",true) == 0)
                {
                    PlayerHasTazer[playerid] = 0;
                    RemovePlayerAttachedObject(playerid, 0);
                    format(string, sizeof(string), "* %s holsters his tazer back.", PlayerName(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not a Cop / FBI / RCSD.");
            }
        }
        return 1;
    }

new PlayerHasTazer[MAX_PLAYERS];    Put it somewhere with the other new functions.
PlayerHasTazer[playerid] = 0;    = OnPlayerConnect.

OnPlayerKeyStateChange:

if ((newkeys & KEY_FIRE))
    {
        if(PlayerHasTazer[playerid] == 1)
        {
            ApplyAnimation(playerid,"KNIFE","knife_3",4.1,0,1,1,0,0,1);
            new victimid = GetClosestPlayer(playerid);
            if(IsPlayerConnected(victimid))
            {
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(GetDistanceBetweenPlayers(playerid,victimid) < 2)
                    {
                        new Float:health;
                        GetPlayerHealth(victimid, health);
                        SetPlayerHealth(victimid, health - 5.0);
                        new string[128];
                        TogglePlayerControllable(i, 0);
                        format(string, sizeof(string), "* You were tazed by %s for 8 seconds.", PlayerName(playerid));
                        SendClientMessage(i, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* You tazed %s for 8 seconds.", PlayerName(i));
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* %s shoots with his tazer at %s, and tazed him.", PlayerName(playerid) ,PlayerName(i));
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        PlayerTazed[i] = 1;
                        SetTimerEx("Tazed",8000, false, "i", i);
                        ApplyAnimation(i, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
                        return 1;
                    }
                }
            }
        }
    }
Give me some reputation if this work, Thanks Yo
Reply
#5

Let me help you then

You got the public function.
Check if the shooter shot with a silenced pistol -> If yes, continue here
Make the victim frozen and send some messages

This is actually all.

Quote:
Originally Posted by WoodPecker
View Post
Give me some reputation if this work, Thanks Yo
For copying out a Godfather script?... LMAO
Reply
#6

Quote:
Originally Posted by Jochemd
View Post
For copying out a Godfather script?... LMAO
Well its true that i have a GF script, but i scripted the SDpistol system.
Reply
#7

Quote:
Originally Posted by WoodPecker
View Post
pawn Code:
OnPlayerCommandText:

if(strcmp(cmd, "/tazer", true) ==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsACop(playerid))
            {
                new x_job[20];
                x_job = strtok(cmdtext, idx);
                if(!strlen(x_job))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tazer [get/putup]");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(strcmp(x_job,"get",true) == 0)
                {
                    PlayerHasTazer[playerid] = 1;
                    SetPlayerAttachedObject(playerid, 0, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
                    format(string, sizeof(string), "* %s unholsters his tazer.", PlayerName(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else if(strcmp(x_job,"putup",true) == 0)
                {
                    PlayerHasTazer[playerid] = 0;
                    RemovePlayerAttachedObject(playerid, 0);
                    format(string, sizeof(string), "* %s holsters his tazer back.", PlayerName(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not a Cop / FBI / RCSD.");
            }
        }
        return 1;
    }

new PlayerHasTazer[MAX_PLAYERS];    Put it somewhere with the other new functions.
PlayerHasTazer[playerid] = 0;    = OnPlayerConnect.

OnPlayerKeyStateChange:

if ((newkeys & KEY_FIRE))
    {
        if(PlayerHasTazer[playerid] == 1)
        {
            ApplyAnimation(playerid,"KNIFE","knife_3",4.1,0,1,1,0,0,1);
            new victimid = GetClosestPlayer(playerid);
            if(IsPlayerConnected(victimid))
            {
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(GetDistanceBetweenPlayers(playerid,victimid) < 2)
                    {
                        new Float:health;
                        GetPlayerHealth(victimid, health);
                        SetPlayerHealth(victimid, health - 5.0);
                        new string[128];
                        TogglePlayerControllable(i, 0);
                        format(string, sizeof(string), "* You were tazed by %s for 8 seconds.", PlayerName(playerid));
                        SendClientMessage(i, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* You tazed %s for 8 seconds.", PlayerName(i));
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* %s shoots with his tazer at %s, and tazed him.", PlayerName(playerid) ,PlayerName(i));
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        PlayerTazed[i] = 1;
                        SetTimerEx("Tazed",8000, false, "i", i);
                        ApplyAnimation(i, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
                        return 1;
                    }
                }
            }
        }
    }
Give me some reputation if this work, Thanks Yo
Program Pawn complier stoped work
Reply
#8

You haven't scripted that.
Reply
#9

First tell me what script you are using so i can help you, and add this:

RemovePlayerAttachedObject(playerid, 0); at OnPlayerConnect


EDIT: Jochemd i dont care if you dont belive me, just stop trolling here.
Reply
#10

What?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)