25.11.2011, 14:38
Hi all, How to kick npc bot when Recording End?
public OnRecordingPlaybackEnd()
{
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);
}
}
}
public OnRecordingPlaybackEnd() { (8) for(new i; i = 0; i++) { new name; //maybe new name[MAX_PLAYER_NAME]; (11) GetPlayerName(i, name, MAX_PLAYER_NAME); (12) if(name == "Your Npc Name") { (14) Kick(i); } } }
Don't double post.
https://sampwiki.blast.hk/wiki/NPC:OnRecordingPlaybackEnd Add: Kick(); Something like this: (Not tested) pawn Код:
|
public OnRecordingPlaybackEnd()
{
foreach (new i : Player)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, MAX_PLAYER_NAME);
if(!strcmp(name, "Your npc name", true))
{
Kick(i);
}
}
}
go learn pawn
pawn Код:
|
foreach (new i : Player)
for ( new i = 0; i != MAX_PLAYERS; ++i )
Kick(i);
#include <a_samp>