if is a EMS?
#3

Quote:
Originally Posted by Sascha
Посмотреть сообщение
what is your variable to say whether some EMS is on duty?...
I'll just use "EMS[playerid] = 1" for "on duty" now, you might need to change it later, or tell me what the actual variable is (or if you don't know, show me the command that makes a player go "on duty").

you can use a function like that:
pawn Код:
stock EMSOnline()
{
    new dutycount = 0;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerOnline(i))
        {
            if(EMS[i] == 1)
            {
                dutycount++;
            }
        }
    }
    if(dutycount > 0)
    {
        return 1;
    }
    return 0;
}
at on your command
pawn Код:
if(EMSOnline) SendClientMessage ("You cant accept death when EMS is available");
Thanks for fast respons. anyways. For a EMS member to go on duty he uses /badge OR /lsfmd and --> Duty..
I will try your code
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)