Taser 0.3C , - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Taser 0.3C , (
/showthread.php?tid=350973)
Taser 0.3C , -
kepa333 - 14.06.2012
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) ==0 || strcmp(cmd, "/ta", true) ==0)
{
if(IsACop(playerid) && PlayerInfo[playerid][pDuty] == 1)
{
if(playerIsHoldingTazer[playerid] == 0)
{
playerIsHoldingTazer[playerid] = 1;
format(string, sizeof(string), "%s gets out his tazer.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SetPlayerAttachedObject(playerid, 0, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
return 1;
}
else if(playerIsHoldingTazer[playerid] == 1)
{
playerIsHoldingTazer[playerid] = 0;
format(string, sizeof(string), "%s puts his tazer back.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
RemovePlayerAttachedObject(playerid, 0);
return 1;
}
}
else if(IsACop(playerid) && PlayerInfo[playerid][pDuty] == 0)
{
SendClientMessage(playerid,COLOR_GREY, "You are not on duty.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not a cop.");
return 1;
}
}
Help pls?
Re: Taser 0.3C , -
Kindred - 14.06.2012
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.
-
kepa333 - 14.06.2012
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);
Re: Taser 0.3C , -
kepa333 - 15.06.2012
EDITE: ty but still not work
Re: Taser 0.3C , -
kepa333 - 17.06.2012
any one can help its needed becouse my players leaveing