SA-MP Forums Archive
HELP List - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP List (/showthread.php?tid=340851)



HELP List - lonako45 - 08.05.2012

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;




Re: HELP List - JaTochNietDan - 08.05.2012

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;
}



Re: HELP List - lonako45 - 09.05.2012

TNX !!!!!!!1