31.05.2009, 16:18
Hey,
I have this command:
How can I tell player if there are no medics on duty at the moment?
(This command works if there are medics on duty)
I have this command:
pawn Код:
dcmd_callmedics(playerid, params[])
{
new location[256], name [MAX_PLAYER_NAME];
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 needs for medics.",name);
SendFMessage(i,COLOR_RED,"Location: %s.",location);
SystemMsg(playerid,"You have called for a medics. Do not move and wait.");
}
else ErrorMsg(playerid, "No Medics on duty right now."); // This line doesn't work
}
}
}
return 1;
}
(This command works if there are medics on duty)