NPC does not get kicked - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC does not get kicked (
/showthread.php?tid=229982)
NPC does not get kicked -
jorambo - 22.02.2011
Heey guys
I am busy with fun stuff for NPC.
Now I want that when a npc enters a racecheckpoint that he gets kicked and the car gets removed.
Now the car gets removed, but the NPC does not gets kicked
This is my code:
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,20,2432.2124,1128.8608,10.6719))
{
DestroyVehicle(Taxi1);
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(IsPlayerNPC(playerid))
{
if(!strcmp(npcname, "NPC6", true))
{
Kick(playerid);
}
}
}
return 1;
}
Thanks
Re: NPC does not get kicked -
maramizo - 22.02.2011
So the playerid == the id of the NPC?
Re: NPC does not get kicked -
jorambo - 22.02.2011
Well I think so, how should I do that otherwise?
Re: NPC does not get kicked -
jorambo - 22.02.2011
Shall controllable NPC help?
Re: NPC does not get kicked -
Elviss - 22.02.2011
Add the on
OnPlayerSpawn
{
if(IsPlayerNPC(playerid))