SSCANF
#2

You can use the function strcat to add the clan tag until check if the player is online.

Example:
PHP код:
new clantag[40] = "[LOK]";
strcat(clantagGetPName(playerto)); 
I make a function to seach by string playername:

PHP код:
forward PlayerIsConnectedS(string[]);
public 
PlayerIsConnectedS(string[])
{
    new 
nombre[MAX_PLAYER_NAME];
    for(new 
i=0;i<GetPlayerPoolSize();i++)
    {
        if(
IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            
GetPlayerName(inombresizeof(nombre));
            if(!
strcmp(nombrestring))
                return 
true;
        }
    }
    return 
false;

Then you can use

PHP код:
if(!PlayerIsConnectedS(clantag)) return SendClientMessage(playeridCOLOR_WHITE1,"The player not connected."); 
Note: Function IsPlayerConnected only accept playerid in params not string.
Reply


Messages In This Thread
SSCANF - by Spenker - 04.08.2016, 17:22
Re: SSCANF - by diego200052 - 04.08.2016, 17:44
Re: SSCANF - by Stinged - 04.08.2016, 17:54
Re: SSCANF - by Konstantinos - 04.08.2016, 18:08

Forum Jump:


Users browsing this thread: 3 Guest(s)