Quote:
Originally Posted by sGarfield
pawn Код:
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, "Tram_Driver", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, npctram, 0); //Putting the NPC into the vehicle we created for it. VehicleEngineOn(npctram); SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0); printf("NPC %s has spawned.", npcname); } return 1; }
|
Already tried that, doesn't work :/
Quote:
Originally Posted by Dwane
Delete all these inside teh OnPlayerConnect callback. All of them are useless because we spawn the NPCs OnPlayerSpawn Callback.
|
I have to SetSpawnInfo, SpawnPlayer and return 1 for it for it to spawn at all..