How to make and post working SPRUNK MASHINE ? -
barts - 06.01.2014
When i add this object players cant press F and get sprunk, how to fix it ?
Re: How to make and post working SPRUNK MASHINE ? -
Vince - 06.01.2014
Script it with OnPlayerKeyStateChange. If they're in front of it and have money, give them 35 health (default Sprunk machine) and apply the animation "VEND_Use" from the library "VENDING".
Re: How to make and post working SPRUNK MASHINE ? -
barts - 08.01.2014
I made it but the animation dont stop and reply.How to play tha animation only 1 time ?
Re: How to make and post working SPRUNK MASHINE ? -
SilentSoul - 08.01.2014
Show me your codes of applying the animations to him.
Re: How to make and post working SPRUNK MASHINE ? -
barts - 08.01.2014
ApplyAnimation(playerid,"VENDING","VEND_Use",4.1,1 ,1,1,1,1,1);
Re: How to make and post working SPRUNK MASHINE ? -
offon - 08.01.2014
ApplyAnimation(playerid,"VENDING","VEND_Use",4.0,1 ,1,1,1,1,1);
Re: How to make and post working SPRUNK MASHINE ? -
SilentSoul - 08.01.2014
Let's create a time to stop this animation.
pawn Code:
ApplyAnimation(playerid,"VENDING","VEND_Use",4.1,1 ,1,1,1,1,1);
SetTimer("stopanims",1000,false);
forward stopanims(playerid);//don't add those lines inside your command , just anywhere else in your script.
public stopanims(playerid)
{
ClearAnimations(playerid);
}
Re: How to make and post working SPRUNK MASHINE ? -
barts - 08.01.2014
Dont work....
Re: How to make and post working SPRUNK MASHINE ? -
SilentSoul - 08.01.2014
Have you tired my codes? , If yes show me full command.
Re: How to make and post working SPRUNK MASHINE ? -
barts - 08.01.2014
PHP Code:
if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, -205.26727, 1139.75818, 19.00000)&& (drinkingsprunk[playerid] == 0))
{
new Float:HP;
GetPlayerHealth(playerid, HP);
SetPlayerHealth(playerid, HP+35);
ApplyAnimation(playerid,"VENDING","VEND_Use",4.1,1 ,1,1,1,1,1);
drinkingsprunk[playerid] = 1;
SetTimerEx("SprunkTime", 2300, false, "i", playerid);
}
}
PHP Code:
forward SprunkTime(playerid);
public SprunkTime(playerid)
{
drinkingsprunk[playerid] = 0;
ClearAnimations(playerid);
return 1;
}