Litle Question !
#10

Basically what you need to do is create a variable that you assign to an actor once you create it. Then you need to link the position of the actor to the position of the cp. Then once you create an actor you apply the animation to the created actor. If we use IceBilizard's code it will be something like this

PHP код:
new Actor[MAX_PLAYERS];
enum CPInfo 

        
Float:CPX
        
Float:CPY
        
Float:CPZ
        
Float:ActorX
        
Float:ActorY
        
Float:ActorZ
        
ActorSkin
        
ActorVW 
}; 
new 
Float:CheckPoint[][CPInfo] = 

    {
CPXCPYCPZActorXActorYActorZActorSkinActorVW}//You can add more 
}; 
CMD:test(playeridparams[]) 

    new 
CPPos[3], ActorPos[4], actorskin
    new 
randomcp random(sizeof(Checkpoint)); 
    
CPPos[0] = CheckPoint[randomcp][CPX]; 
    
CPPos[1] = CheckPoint[randomcp][CPY]; 
    
CPPos[2] = CheckPoint[randomcp][CPZ]; 
    
//Actor 
    
actorskin CheckPoint[randomcp][ActorSkin]; 
    
ActorPos[0] = CheckPoint[randomcp][ActorX]; 
    
ActorPos[1] = CheckPoint[randomcp][ActorY]; 
    
ActorPos[2] = CheckPoint[randomcp][ActorZ]; 
    
ActorPos[3] = CheckPoint[randomcp][ActorVW]; 
    
CreatePlayerCheckpoint(playeridCPPos[0], CPPos[1], CPPos[2], 5.0); 
    
Actor[playerid] = CreateActor(actorskinActorPos[0], ActorPos[1], ActorPos[2], 0.0); 
    
ApplyActorAnimation(Actor[playerid], "FOOD""FF_Sit_Eat3"4.0100001);
    
SetActorVirtualWorld(Actor[playerid], ActorPos[3]); 
    return 
1

Hope this helps.
Reply


Messages In This Thread
Litle Question ! - by TYDS - 07.11.2016, 02:04
Re: Litle Question ! - by Hansrutger - 07.11.2016, 02:51
Re: Litle Question ! - by thefirestate - 07.11.2016, 03:00
Re: Litle Question ! - by TYDS - 07.11.2016, 03:01
Re: Litle Question ! - by IceBilizard - 07.11.2016, 04:03
Re: Litle Question ! - by TYDS - 07.11.2016, 14:32
Re: Litle Question ! - by TYDS - 08.11.2016, 02:05
Re: Litle Question ! - by Pearson - 08.11.2016, 02:09
Re: Litle Question ! - by TYDS - 08.11.2016, 02:13
Re: Litle Question ! - by Tass007 - 08.11.2016, 02:29

Forum Jump:


Users browsing this thread: 2 Guest(s)