IsPlayerConnected check
#1

Question 1:
You can see this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/randomcommand", true))
    {
        if(IsPlayerConnected(playerid))
        {
           //Code
        }
        return 1;
    }
    return 0;
}
in the most of gamemodes, but isn't it useless as a player who is not connected can't write a command?
Edit: Answer is yes, it is useless.

Question 2:
Which native functions include IsPlayerConnected check? I know Kick and Ban does but which others?
Reply
#2

Indeed, it's most likely used by Godfather, or people who just copypaste godfather commands.
You clearly can leave away.
Reply
#3

Ok thanks, I just wanted to be sure. Godfather is really bad to learn scripting...
Reply
#4

Ok thanks. One more question, do you know which native functions include IsPlayerConnected check? I know Kick and Ban does but which others?
Reply
#5

Ok thanks. I've already read your code optimisation topic and I use it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)