14.07.2015, 15:59
Can anyone tell me how to add npc bots in samp 0.3.7 ?
I saw all tutorials but they are outdated
I saw all tutorials but they are outdated

#include <a_samp> #include <a_npc> #if defined FILTERSCRIPT new crazyVehicle; //Global variable! public OnFilterScriptInit() { print("Bots"); ConnectNPC("crazy","pilot"); crazyVehicle = CreateVehicle(476, 0.0, 0.0, 5.0, 0.0, 226, 1, 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)); //Getting the NPC's name. if(!strcmp(npcname, "crazy", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, crazyVehicle, 0); //Putting the NPC into the vehicle we created for it. } return 1; } } #endif |