27.10.2009, 18:16
Hi
I'm currently making a movie scene on SAMP using a collection of bots
Obviously I need to have control of when each bot spawns - does anyone know what I can do to this code to get it to work when I enter a command (lets say /cueat400)
Matt
And yes I'm aware that the code was originally for an LV taxi NPC - I simply edited it for personal use because I find it easier than writing the FS from scratch. I am not going to release it - it's just for a video clip i'm making
I'm currently making a movie scene on SAMP using a collection of bots
Obviously I need to have control of when each bot spawns - does anyone know what I can do to this code to get it to work when I enter a command (lets say /cueat400)
Matt
And yes I'm aware that the code was originally for an LV taxi NPC - I simply edited it for personal use because I find it easier than writing the FS from scratch. I am not going to release it - it's just for a video clip i'm making
Код:
#include <a_samp> new at400vid2; public OnGameModeInit() { print("GaGlets TAXI LV"); // NPCS ConnectNPC("at400vid2","at400vid2"); at400vid2 = AddStaticVehicle(577,2310.8389,2407.7266,10.4841,268.0414,123,123); // 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)); //Getting the NPC's name. if(!strcmp(npcname, "at400vid2", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, at400vid2, 0); //Putting the NPC into the vehicle we created for it. } return 1; } //Other stuff for normal players goes here! return 1; }