Tell player if no medics connected..
#4

try this
pawn Код:
dcmd_callmedics(playerid, params[])
{
    new location[256], name[MAX_PLAYER_NAME], anymedics;
    if (sscanf(params, "s", location)) UsageMsg(playerid, "Usage: /callmedics <your location>");
    else
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(gTeam[i] == TEAM_MEDICS)
            {
                if(MedicOnDuty[i] == 1)
                {
                    GetPlayerName(playerid,name,sizeof(name));
                    SendFMessage(i,COLOR_RED,"Player %s has needs for a medic.",name);
                    SendFMessage(i,COLOR_RED,"Location: %s.",location);
                    anymedics = 1;
                   
                }
               
            }
        }
        if (anymedics == 1) SystemMsg(playerid,"You have called for a medic. Do not move and wait.");
        else ErrorMsg(playerid, "No Medics on duty right now.");
    }
    return 1;
}
Reply


Messages In This Thread
Tell player if no medics connected.. - by SiJ - 31.05.2009, 16:18
Re: Tell player if no medics connected.. - by Daren_Jacobson - 31.05.2009, 16:23
Re: Tell player if no medics connected.. - by SiJ - 31.05.2009, 16:29
Re: Tell player if no medics connected.. - by Daren_Jacobson - 31.05.2009, 16:35

Forum Jump:


Users browsing this thread: 1 Guest(s)