SA-MP Forums Archive
NPC Disconnect and reconnect - 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 Disconnect and reconnect (/showthread.php?tid=554429)



NPC Disconnect and reconnect - cyberlord - 03.01.2015

Hello so first i will explain what i want to do : so i have 3 NPCs that drives trains around the map , and now i want to make new job train driver , so i want to do like if player takes train driver job one of NPC will be kicked (if more players takes this job more npc will be kicked) so in one time can only by 3 train drivers , if player leaves theyr job NPC will be reconnected and do theyr job , hope u understand what i meen . so to disconnect npc i think i can you disconnect npc and on reconnect use connect npc , but i realy dont know ware should i put my code when i done cuz i think i can connect npc only on gamemodeint so probably all my code should by there ?