25.06.2011, 20:33
Код:
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot
Код:
new MyFirstNPCVehicle / / Global variable? Public OnGameModeInit () { print ("my gamemode"); ConnectNPC ("MyFirstNPC", "mynpc"); MyFirstNPCVehicle CreateVehicle = (400, 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; }
I hope you will help
L84S