if is a EMS?
#8

try it with "if(EMSOnline())"
oh and ofc change "IsPlayerOnline" to "IsPlayerConnected"

pawn Код:
stock EMSOnline()
{
    new dutycount = 0;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][pDuty] == 1)
            {
                dutycount++;
            }
        }
    }
    if(dutycount > 0)
    {
        return 1;
    }
    return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        if(EMSOnline()) return SendClientMessage(playerid, 0xFFFFFFAA, "Whatever");
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
if is a EMS? - by AustinWeerdGuy - 18.03.2014, 14:29
Re: if is a EMS? - by Sascha - 18.03.2014, 14:42
Re: if is a EMS? - by AustinWeerdGuy - 18.03.2014, 14:49
Re: if is a EMS? - by AustinWeerdGuy - 18.03.2014, 15:04
Re: if is a EMS? - by Sascha - 18.03.2014, 15:07
Re: if is a EMS? - by AustinWeerdGuy - 18.03.2014, 15:15
Re: if is a EMS? - by AustinWeerdGuy - 18.03.2014, 15:37
Re: if is a EMS? - by Sascha - 18.03.2014, 15:40

Forum Jump:


Users browsing this thread: 1 Guest(s)