20.01.2012, 00:47
Hola gente, hoy me quise poner los npc que vienen con samp, el problema es que el NPC, entra y spawnea pero no entra al vehiculo, solo spawnea y se queda ahi D:.
Nose lo que pasa, aca todo de los npc, que son 3.
Alguien sabe por que ?, quiero poner los npc de de train_ls, train_lv, train_sf pero quedan parados en el spawn D:
Nose lo que pasa, aca todo de los npc, que son 3.
pawn Код:
new AutoNPC;
new AutoNPC2;
new AutoNPC3;
public OnGameModeInit()
{
//hostname etc,
AutoNPC = Vehicle_AddStatic(537, 1467.0, 975.0, 11.0, 0.0, random(0), random(161), 600);
AutoNPC2 = Vehicle_AddStatic(538, 1467.0, 975.0, 11.0, 0.0, random(0), random(161), 600); // DFT-30
AutoNPC3 = Vehicle_AddStatic(537, 1467.0, 975.0, 11.0, 0.0, random(0), random(161), 600); // DFT-30
ConnectNPC("MyFirstNPC","train_ls");
ConnectNPC("MyFirstNPC2","train_sf");
ConnectNPC("MyFirstNPC3","train_lv");
//resto de la callback
}
public OnPlayerSpawn(playerid)
{
// Always allow NPC's to spawn without logging in
if (IsPlayerNPC(playerid))
return 1;
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, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, AutoNPC, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
if(!strcmp(npcname, "MyFirstNPC2", true))
{
PutPlayerInVehicle(playerid, AutoNPC2, 0);
return 1;
}
if(!strcmp(npcname, "MyFirstNPC3", true))
{
PutPlayerInVehicle(playerid, AutoNPC3, 0);
return 1;
}
return 1;
}
//resto de la callback
Alguien sabe por que ?, quiero poner los npc de de train_ls, train_lv, train_sf pero quedan parados en el spawn D: