What can I do for not spawn Vehicle npc
#1

What can I do for not spawn Vehicle npc





PHP код:
[PHP]if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  
{
  
  
  
  
         new 
MyFirstNPCVehicle;
         
MyFirstNPCVehicle CreateVehicle(5600.00.05.00.0335000);
         
GetPlayerName(playeridnpcnamesizeof(npcname)); //Getting the NPC's name.
         
if(!strcmp(npcname"Taxi"true)) //Checking if the NPC's name is MyFirstNPC
    
{
          
SetPlayerSkin(playerid193);
          
SetPlayerColor(playerid,COLOR_SEXYGREEN);
          
label[playerid] = Create3DTextLabel("TAXI",COLOR_SAFID,30.0,40.0,50.0,40.0,0);
          
Attach3DTextLabelToPlayer(label[playerid], playerid0.00.00.4);
          
PutPlayerInVehicle(playeridMyFirstNPCVehicle0); //Putting the NPC into the vehicle we created for it.
    
}
         
MyFirstNPCVehicle CreateVehicle(4870.00.05.00.0335000);
         
GetPlayerName(playeridnpcnamesizeof(npcname)); //Getting the NPC's name.
         
if(!strcmp(npcname"Helikopter"true)) //Checking if the NPC's name is MyFirstNPC
    
{
          
SetPlayerSkin(playerid246);
          
SetPlayerColor(playerid,COLOR_SEXYGREEN);
          
label[playerid] = Create3DTextLabel("khalaban",COLOR_SAFID,30.0,40.0,50.0,40.0,0);
          
Attach3DTextLabelToPlayer(label[playerid], playerid0.00.00.1);
          
PutPlayerInVehicle(playeridMyFirstNPCVehicle0); //Putting the NPC into the vehicle we created for it.
    
}
    
    
    return 
1;
  } 
[/PHP]
Reply
#2

If the NPCs you want to use are recorded with type 'on vehicle', then as long as all of them connect correctly and they enter the vehicles you created, the playback will start playing so those vehicles won't exist there.
Reply
#3

Quote:

If the NPCs you want to use are recorded with type 'on vehicle', then as long as all of them connect correctly and they enter the vehicles you created, the playback will start playing so those vehicles won't exist there.

pls example
i bad english
Reply
#4

help pls
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)