Having issues with NPC's.
#9

I had to dig deep into my files its a simple part but im sorry i cant be sure if it actually works but here you
are. Maybe you get some ideas..who knows...

gamemodeinit;
pawn Код:
tram1 = AddStaticVehicle(449,-2264.6882,527.2341,35.5907,180.4091,194,180);// tram (duh)
        // i remember using staticvehicle is better than using createvehicle if it comes to npc
spawning..
pawn Код:
public OnPlayerSpawn(playerid)
{

    if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
//----------------------------------NPC
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname,"Jack",true)) {//
            SetPlayerSkin(playerid, 60);
            PutPlayerInVehicle(playerid,tram1, 0);
        }
    }
   return 1;
}
Dont have anything in onplayerconnect its just this.
BTW maybe because of isplayernpc return 1 in any script could conflict the use of npc's in your GM.
make sure to outrule that too.
Reply


Messages In This Thread
Having issues with NPC's. - by Dokins - 13.05.2015, 01:24
Re: Having issues with NPC's. - by Threshold - 13.05.2015, 04:40
Re: Having issues with NPC's. - by Smileys - 13.05.2015, 05:31
Re: Having issues with NPC's. - by DaniceMcHarley - 13.05.2015, 05:53
Re: Having issues with NPC's. - by Dokins - 13.05.2015, 13:49
Re: Having issues with NPC's. - by Dokins - 18.05.2015, 15:20
Re: Having issues with NPC's. - by AIped - 18.05.2015, 15:29
Re: Having issues with NPC's. - by Dokins - 18.05.2015, 15:57
Re: Having issues with NPC's. - by AIped - 18.05.2015, 16:08
Re: Having issues with NPC's. - by Dokins - 18.05.2015, 16:15

Forum Jump:


Users browsing this thread: 2 Guest(s)