Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

need help with ading 3 npc with veh

Initiate Mage
Joined
Feb 22, 2017
Messages
71
Reaction score
4
all the npc joins the server buth onli first one enters the vehicle ( tram ) the other 2 just stai in the spwn area
anyo1988 - need help with ading 3 npc with veh - RaGEZONE Forums
here is my scripting

new Nea_spagatuVehicle; //Global variable!
new AndreyVehicle; //Global variable!
new LocotenentuVehicle; //Global variable!

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=OnPlayerSpawn=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Nea_spagatu", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, Nea_spagatuVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Andrey", true))
{
PutPlayerInVehicle(playerid, AndreyVehicle, 0);
return 1;
}

GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Locotenentu", true))
{
PutPlayerInVehicle(playerid, LocotenentuVehicle, 0);
return 1;
}
if(IsPlayerNPC(playerid))
{
SetPlayerSkin(playerid,PlayerInfo[playerid][pChar]);
GivePlayerWeapon(playerid,30,99999);
return 1;
}
etc

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=OnGameModeInit=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
public OnGameModeExit()
{

print("my gamemode");
ConnectNPC("Nea_Spagatu","yonik17");
Nea_spagatuVehicle = CreateVehicle(449, 0.0, 0.0, 7.0, 0.0, 249, 7, 5000);

print("my gamemode");
ConnectNPC("Locotenentu","airport");
LocotenentuVehicle = CreateVehicle(497, 0.0, 0.0, 7.0, 0.0, 231, 3, 5000);

print("my gamemode");
ConnectNPC("Andrey","buss");
AndreyVehicle = CreateVehicle(431, 0.0, 0.0, 7.0, 0.0, 2423, 5, 5000);

i have created the vehle myself, if i do not create them it does not create the vehile and now that i have create them it changes the id of all other vehiles
anyo1988 - need help with ading 3 npc with veh - RaGEZONE Forums
how can i fix all this please
 
Back
Top