fcnpc bot
#1

When my fcnpc bot try to enter a vehicle he die, how to solve this problem?
Reply
#2

Up, please
Reply
#3

post code
Reply
#4

variables:
PHP Code:
new
    
FCNPC,
    
npckey,
    
fcnpcveh
command:
PHP Code:
CMD:fcnpcstart(playerid,params[])
{
    if(!
GetPVarInt(playerid"BOTGO"))
    {
        
fcnpcveh AddStaticVehicle(5601560.761443.7210.54180.011);
        
FCNPC FCNPC_Create("daddyfoot2");
        
FCNPC_SetSkin(FCNPC38);
        
FCNPC_StartPlayingPlayback(FCNPC"daddyfoot2");
        
npckey 1;
        
SetPVarInt(playerid"BOTGO"1);
    }
    else
    {
        
FCNPC_StopPlayingPlayback(FCNPC);
        
FCNPC_Destroy(FCNPC);
        
SetPVarInt(playerid"BOTGO"0);
    }
    return 
1;

callbacks
PHP Code:
public FCNPC_OnVehicleEntryComplete(npcidvehicleidseat)
{
    
FCNPC_StartPlayingPlayback(npcid"daddycar3");
    return 
1;
}
public 
FCNPC_OnVehicleExitComplete(npcid)
{
    
FCNPC_StartPlayingPlayback(npcid"daddyfoot4");
    return 
1;
}
public 
FCNPC_OnFinishPlayback(npcid)
{
    new 
type;
    switch(
npckey)
    {
        case 
0:
        {
            
SetVehicleToRespawn(fcnpcveh);
            
FCNPC_StartPlayingPlayback(npcid"daddyfoot2");
            
npckey++;
        }
        case 
1:
        {
            
type FCNPC_EnterVehicle(FCNPCfcnpcveh10);
            
npckey++;
        }
        case 
2:
        {
            
type FCNPC_ExitVehicle(FCNPC);
            
npckey 0;
        }
    }
    return 
1;

Reply
#5

Help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)