NPC problem.
#1

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?
Reply
#2

do something like, IsNPCInRangeOfPoint(xxxx,yyyy,zzzz)
if yes = kick npc
Reply
#3

Explane i can not understood you
Reply
#4

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
Reply
#5

you mean like this:
pawn Код:
new Racer = ConnectNPC("Racer","Race");
// That under ongamemodeint
public OnPlayerEnterCheckpoint(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        Kick(Racer);
    }  
    return 1;
}
Reply
#6

Yea would be something like that
Reply
#7

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.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)