16.10.2011, 16:00
Ok ive done it as a fs and it complies find no errors or warnings but it isnt appearing ingame and i cant see it tring to login in.
Code:
#define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT new MyFirstNPCVehicle; //Global variable! public OnFilterScriptInit() { print("my filterscript"); ConnectNPC("MyFirstNPC","area51tank1"); MyFirstNPCVehicle = CreateVehicle(432, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); return 1; } public OnFilterScriptExit() { return 1; } #else #endif 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, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it. } return 1; } //Other stuff for normal players goes here! return 1; }