28.12.2013, 15:53
Hello.
I created two NPC BOTS.
First - on foot. (Kareivis)
Second - in vehicle.. (MyFirstNPC)
With first NPC BOT all good, but with second no..
My second NPC bot(which in vehicle)
Joined to my server, but he hadn't put to vehicle.
OnPlayerSpawn:
Why my second NPC bot hadn't put to vehicle? HELP ME, please!
I created two NPC BOTS.
First - on foot. (Kareivis)
Second - in vehicle.. (MyFirstNPC)
With first NPC BOT all good, but with second no..
My second NPC bot(which in vehicle)
Joined to my server, but he hadn't put to vehicle.
OnPlayerSpawn:
Код:
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, "Kareivis", true)) return SetPlayerPos(playerid, -1667.8429,-153.6539,16.3167) && SetPlayerFacingAngle(playerid, 317.7) && SetPlayerSkin(playerid, 287);
if(!strcmp(npcname, "MyFirstNPC", true))
{
PutPlayerInVehicle(playerid, YourVehicle, 0);
}
return 1;
}


)