How to make and post working SPRUNK MASHINE ?
#1

When i add this object players cant press F and get sprunk, how to fix it ?
Reply
#2

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".
Reply
#3

I made it but the animation dont stop and reply.How to play tha animation only 1 time ?
Reply
#4

Show me your codes of applying the animations to him.
Reply
#5

ApplyAnimation(playerid,"VENDING","VEND_Use",4.1,1 ,1,1,1,1,1);
Reply
#6

ApplyAnimation(playerid,"VENDING","VEND_Use",4.0,1 ,1,1,1,1,1);
Reply
#7

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);
}
Reply
#8

Dont work....
Reply
#9

Have you tired my codes? , If yes show me full command.
Reply
#10

PHP Code:
    if(IsKeyJustDown(KEY_SECONDARY_ATTACKnewkeysoldkeys))
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5,  -205.267271139.7581819.00000)&& (drinkingsprunk[playerid] == 0))
        {
                new 
Float:HP;
                
GetPlayerHealth(playeridHP);
         
SetPlayerHealth(playeridHP+35);
        
ApplyAnimation(playerid,"VENDING","VEND_Use",4.1,,1,1,1,1,1);
        
drinkingsprunk[playerid] = 1;
        
SetTimerEx("SprunkTime"2300false"i"playerid);
        }
    } 
PHP Code:
forward SprunkTime(playerid);
public 
SprunkTime(playerid)
{
    
drinkingsprunk[playerid] = 0;
     
ClearAnimations(playerid);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)