What is correct?
#1

Hello, i want that if a NPC connects, the NPC is getting banned. Is that correct or so?

Код:
	if(IsPlayerNPC(playerid))
	{
	   Ban(playerid);
	}
Код:
	if(IsPlayerNPC(playerid))
	{
	   Ban(playerid);
           return 1;
	}
Код:
	if(IsPlayerNPC(playerid))
	{
	   Ban(playerid);
           return 0;
	}
Reply
#2

Whether you put a return is entirely dependent on whether you want the code below that block (if any) to be executed. If you don't want it to be executed you put a return, otherwise you don't. As for the return value itself, I think returning 0 will stop the server looking for the same callback in other scripts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)