Quote:
Originally Posted by Cedimedi
pawn Code:
#include <a_samp>
new MyFirstNPCVehicle; public OnFilterScriptInit() { print("my filterscript"); ConnectNPC("MyFirstNPC","hydrapilot"); MyFirstNPCVehicle = CreateVehicle(520, 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)); //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; }
Whats wrong there? I've done all correct but the bot still stay at the same pos. i think PutPLayerInVehicle don't work, but why?
|
OnPlayerRequestClass , if the player is an NPC you have to return 1....