NPC help
#4

Are you able to stop writing in big red large text?

If your servers kicks if you don't login after a while, you could use:
Код:
// Blah blah code here

if(!IsPlayerNPC(playerid))
{
   // Code Here, this part is if the player -IS NOT- an NPC.
}
return 1;


// Blah blah code here
So if your login system REQUIRES login, I'm assuming you're using a timer, under the function that the timer is calling, add the above code, the code basicly checks if the player isn't an NPC.
Код:
 
IsPlayerNPC
returns 1 if the player IS an NPC, we are adding:
Код:
 
!
infront of
Код:
 
IsPlayerNPC
the ! basicly means "Not" in PAWN code.
So we're checking if the player's NOT an NPC, and if the function returns 1 (the player isn't an NPC) It will continue with the kick.
and if the player's IS an NPC, it will not kick.
If it isn't an NPC, then carry on with the code.
Reply


Messages In This Thread
NPC help - by Zeros - 09.03.2010, 14:44
Re: NPC help - by biltong - 09.03.2010, 14:52
Re: NPC help - by Correlli - 09.03.2010, 14:53
Re: NPC help - by Joe_ - 09.03.2010, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)