Put NPC in vehicle ?
#1

Hi guys, I trying to put a NPC in a train. Don't can create a train with CreateVehicle, I need AddStaticVehicleEx. Then...

global variable
PHP код:
new trainveh
OnGameModeInit
PHP код:
    ConnectNPC("train""train");
    
trainveh AddStaticVehicleEx(5380.00.00.00.0001); 
OnPlayerSpawn
PHP код:
    if(IsPlayerNPC(playerid))
      {
        new 
npcname[24];
        
GetPlayerName(playeridnpcname24);
        if(!
strcmp(npcname"train"true))
        {
            
SetPlayerSkin(playerid255);
               
PutPlayerInVehicle(playeridtrainveh0);
          }
        return 
1;
      } 
NPC is connect and I can see it but he don't spawn in the vehicle. What I can do?
Reply


Messages In This Thread
Put NPC in vehicle ? - by Guss - 06.11.2015, 15:20
Respuesta: Put NPC in vehicle ? - by Guss - 06.11.2015, 22:41
Re: Put NPC in vehicle ? - by DeathCore - 07.11.2015, 01:32
Re: Put NPC in vehicle ? - by J0sh... - 07.11.2015, 01:45
Re: Put NPC in vehicle ? - by jlalt - 07.11.2015, 02:50
Respuesta: Put NPC in vehicle ? - by Guss - 07.11.2015, 20:12

Forum Jump:


Users browsing this thread: 3 Guest(s)