GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: Bluebay - 2011. Március 07. - 19:37:02

Cím: [NPC] Player Spawnnál van az npc-m :S [MEGOLDVA]
Írta: Bluebay - 2011. Március 07. - 19:37:02
Na már kezdek elõrébb jutni, mostmár csináltam sima Buszt ami tökéletesen mükszik(UP: Mod resi uán besz*rt az is) és gyalogoló emberkét.
No a probléma most a következõ:
Van egy ilyen kódom:
 
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new TurismoVehicle;
new Bluebay_Busz_LSVehicle;
public OnFilterScriptInit ( )
{
  print ( \"NPC Betöltése. . .(TURISMO)\" );
  ConnectNPC ( \"Turismo\", \"turismo_vh_pd_LS\" );
  ConnectNPC ( \"Busz_LS\", \"Bluebay_Busz_LS\" );
  TurismoVehicle = CreateVehicle(451, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  Bluebay_Busz_LSVehicle = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  return 1;
}
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));
        if(!strcmp(npcname, \"Turismo\", true))
        {
            PutPlayerInVehicle(playerid, TurismoVehicle, 0);
            return 1;
        }
        if(!strcmp(npcname, \"Busz_LS\", true)) //a 2. NPC
        {
            PutPlayerInVehicle(playerid, Bluebay_Busz_LSVehicle, 0);
            return 1;
        }
        return 1;
    }
    //Other stuff for normal players goes here!
    return 1;
}

 
Ebben azt akartam megoldani, hogy 1 filterscriptbe többet teszek.
Nos Busz_LS nevû NPC tökéletesen végzi a munkáját, míg a turismo nem éppen. A turismo lespawnol a karik kezdõhelyére egy turismot de enm oda ahova kéne, és nem is indul el maga a kocsi.