HELP List
#1

I do command if you doing /helpers its see you the connected helpers
Now I want if now helpers connecting on the server its write : No connecting helpers on the sever !
This my command :

PHP код:
if(strcmp(cmdtext"/Helpers"true) == || strcmp(cmdtext"/HE"true) == 0)
{
    
SendClientMessage(playerid,Green2,":шщйоъ дмфшйн озебшйн");
    for(new 
iGetMaxPlayers(); != ji++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
IsPlayerHelper(i))
            {
                
format(str,sizeof(str),"%d дмфш шод - %s ддмфш",dini_Int(DiniHelper(i),"HelperLevel"),GetName(i));
                
SendClientMessage(playerid,Green2,str);
            }
        }
    }
    return 
1;

Reply
#2

Simply count how many helpers were found and if 0 were found, send a message, for example:

pawn Код:
if(strcmp(cmdtext, "/Helpers", true) == 0 || strcmp(cmdtext, "/HE", true) == 0)
{
    SendClientMessage(playerid,Green2,":шщйоъ дмфшйн озебшйн");
    new count;
    for(new i, j = GetMaxPlayers(); i != j; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerHelper(i))
            {
                count++;
                format(str,sizeof(str),"%d дмфш шод - %s ддмфш",dini_Int(DiniHelper(i),"HelperLevel"),GetName(i));
                SendClientMessage(playerid,Green2,str);
            }
        }
    }
    if(count == 0) // There are no helpers on the server, do what you want to do
    return 1;
}
Reply
#3

TNX !!!!!!!1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)