SA-MP Forums Archive
What can I do for not spawn Vehicle npc - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What can I do for not spawn Vehicle npc (/showthread.php?tid=474465)



What can I do for not spawn Vehicle npc - par30 - 08.11.2013

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]


Re: What can I do for not spawn Vehicle npc - Konstantinos - 08.11.2013

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.


Re: What can I do for not spawn Vehicle npc - par30 - 08.11.2013

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


Re: What can I do for not spawn Vehicle npc - par30 - 08.11.2013

help pls