Taser 0.3C ,
#1

I wish to use The taser Object that was made in 0.3C with a Knife Anymation , But ive no idea how to put the knife anymation of i put it in there the animation only works when i do /tazer not when i click my lines


PHP Code:
    if(strcmp(cmd"/tazer"true) ==|| strcmp(cmd"/ta"true) ==0)
    {
        if(
IsACop(playerid) && PlayerInfo[playerid][pDuty] == 1)
        {
            if(
playerIsHoldingTazer[playerid] == 0)
            {
                
playerIsHoldingTazer[playerid] = 1;
                
format(stringsizeof(string), "%s gets out his tazer."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
                
SetPlayerAttachedObject(playerid01864260.060.010.08180.00.00.0);
                return 
1;
            }
            else if(
playerIsHoldingTazer[playerid] == 1)
            {
               
playerIsHoldingTazer[playerid] = 0;
             
format(stringsizeof(string), "%s puts his tazer back."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
            
RemovePlayerAttachedObject(playerid0);
            return 
1;
            }
        }
        else if(
IsACop(playerid) && PlayerInfo[playerid][pDuty] == 0)
        {
        
SendClientMessage(playerid,COLOR_GREY"You are not on duty.");
        return 
1;
        }
        else
        {
        
SendClientMessage(playeridCOLOR_GREY"You are not a cop.");
        return 
1;
        }
    } 
Help pls?
Reply
#2

Untested:
pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
    {
        if(playerIsHoldingTazer[playerid] == 1)
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
                //Play animation here
            }
        }
    }
    return 1;
}
Not quite sure what the knife animation is, so I didn't add it. Need to add it yourself or you can tell me what it is.
Reply
#3

Thx ill try it out

my pawno crashed with it

the Anymation
ApplyAnimation(playerid,"KNIFE","knife_hit_3",4.1, 0,1,1,0,0,1);
Reply
#4

EDITE: ty but still not work
Reply
#5

any one can help its needed becouse my players leaveing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)