04.08.2011, 13:46
Hey guys i got 4 NPCS in my script.
And i want to know how do i kick the shit npcs?
Please tell me.
Thanks!
Davz~
And i want to know how do i kick the shit npcs?
Please tell me.
Thanks!
Davz~
Kick(id);
public KickHydraAssualts(playerid)
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "HydraAssualt1", true))
{
Kick(HydraAssualt1);
Kick(playerid);
return 1;
}
if(!strcmp(npcname, "HydraAssualt2", true))
{
Kick(HydraAssualt2);
Kick(playerid);
return 1;
}
if(!strcmp(npcname, "HydraAssualt3", true))
{
Kick(HydraAssualt3);
Kick(playerid);
return 1;
}
if(!strcmp(npcname, "HydraAssualt4", true))
{
Kick(HydraAssualt4);
Kick(playerid);
return 1;
}
return 1;
}
stock KickNPC(npcName[])
{
for(new i, tmpName[MAX_PLAYER_NAME]; i < MAX_PLAYERS; ++i)
{
if(IsPlayerNPC(i))
{
if(!strcmp(tmpName, npcName, true))
{
return Kick(i);
}
}
}
return 0;
}
KickNPC("HydraAssualt1");