NPC problem. - 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 problem. (
/showthread.php?tid=396542)
NPC problem. -
Gangster-rocks - 01.12.2012
Hi all i got a problem with NPC's
I am Creating a race system for my gm and i wanna know how to remove the npc after i done the race?
Re: NPC problem. -
Lz - 01.12.2012
do something like, IsNPCInRangeOfPoint(xxxx,yyyy,zzzz)
if yes = kick npc
Re: NPC problem. -
Gangster-rocks - 01.12.2012
Explane i can not understood you
Re: NPC problem. -
Lz - 01.12.2012
Get your race finish co-ordinates and then check if the npc is in range of them, If he is then make the server kick him
Re: NPC problem. -
Gangster-rocks - 01.12.2012
you mean like this:
pawn Код:
new Racer = ConnectNPC("Racer","Race");
// That under ongamemodeint
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerNPC(playerid))
{
Kick(Racer);
}
return 1;
}
Re: NPC problem. -
Lz - 01.12.2012
Yea would be something like that
Re: NPC problem. -
Konstantinos - 01.12.2012
Kick(playerid); not Racer.
And you should check if x, y, z are equal to the last checkpoint, otherwise it will kick the NPC from the first checkpoint.
Re: NPC problem. -
Gangster-rocks - 01.12.2012
Quote:
Originally Posted by Dwane
Kick(playerid); not Racer.
And you should check if x, y, z are equal to the last checkpoint, otherwise it will kick the NPC from the first checkpoint.
|
i already done that but i post an examble