NPC BOT with vehicle , Help please.! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: NPC BOT with vehicle , Help please.! (
/showthread.php?tid=483960)
NPC BOT with vehicle , Help please.! -
gtascripterultimate - 28.12.2013
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:
Код:
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;
}
Why my second NPC bot hadn't put to vehicle? HELP ME, please!
Re: NPC BOT with vehicle , Help please.! -
gtascripterultimate - 28.12.2013
Server_Log :
[18:53:39] Incoming connection: 127.0.0.1:4139
[18:53:39] Incoming connection: 127.0.0.1:4140
[18:53:40] [npc:join] Kareivis has joined the server (0:127.0.0.1) First NPC
[18:53:40] [npc:join] jones has joined the server (1:127.0.0.1) Second NPC(what's wrong with him?

)
[18:55:51] Incoming connection: 25.172.47.147:4183
[18:55:51] [join] Gta has joined the server (2:25.172.47.147) Me