Kick NPC - 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: Kick NPC (
/showthread.php?tid=197917)
Kick NPC -
knackworst - 10.12.2010
Hey, can I like kick my NPC with a timer? and let it come back with a timer
if yes, please tell me how...
Re: Kick NPC -
Lynn - 10.12.2010
Yes, it can be done,
as I did it for a AirStrike in my San Andreas War v1 and v.2
But I forget how I did it...
I remember I had to use, /airstrike which would connect the NPC,
and the timer, would KickPlayer(NPCName);
Try Searching for it.
Re: Kick NPC -
knackworst - 10.12.2010
Quote:
Originally Posted by Lynn
Yes, it can be done,
as I did it for a AirStrike in my San Andreas War v1 and v.2
But I forget how I did it...
I remember I had to use, /airstrike which would connect the NPC,
and the timer, would KickPlayer(NPCName);
Try Searching for it.
|
hmm, so I can use Kick("NPCname") instead of Kick(Playerid)?
does this also work with playerID's?
Re: Kick NPC -
Lynn - 10.12.2010
No that's wrong.
I was wrong.
I must of used, DisconnectNPC();
or what ever the correct Syntax is.
I currently have not used Pawno is quite some time, so I don't remember it all perfectly xD
Then use, ConnectNPC();
Re: Kick NPC -
DRIFT_HUNTER - 10.12.2010
Well you must know what is your npc ID and change playerid with NPCid
Maybe you will use something like these
pawn Код:
for(new i; i = 0; i++)
{
new name;//maybe new name[MAX_PLAYER_NAME];
GetPlayerName(i,name,MAX_PLAYER_NAME);
If(name == "Your Npc Name")
{
Kick(i);
}
}
Thats about kick
Re: Kick NPC -
Lynn - 10.12.2010
Yes, you must use Kick();
In-order to disconnect the NPC.
As I just remembered,
DisconnectNPC(); is not a real function.
My apologies.