NPC invisible.
#2

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;
    }
Reply


Messages In This Thread
NPC invisible. - by Bates - 09.01.2012, 16:12
Re: NPC invisible. - by sGarfield - 09.01.2012, 16:18
Re: NPC invisible. - by Konstantinos - 09.01.2012, 16:24
Re: NPC invisible. - by Bates - 09.01.2012, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)