22.05.2009, 09:54
Quote:
Originally Posted by Justas [SiJ
]
How can I check if there are no connected players in gTeam[i] == TEAM_MEDICS? pawn Код:
pawn Код:
|
Originally Posted by Justas [SiJ
]
How can I check if there are no connected players in gTeam[i] == TEAM_MEDICS? pawn Код:
pawn Код:
|
dcmd_callmedics(playerid, params[])
{
new place[256];
new name [MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if (sscanf(params, "s", place)) UsageMsg(playerid, "Usage: /callmedics <your location>");
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_MEDICS)
{
SendFMessage(i,COLOR_SYSTEM,"Player %s needs for medics.",name);
SendFMessage(i,COLOR_SYSTEM,"Location %s.",place);
SystemMsg(playerid,"You have called for a medics. Do not move and wait for them.");
}
}
return 1;
}
if(gTeam[i] == TEAM_MEDICS)
{
SendFMessage(i,COLOR_SYSTEM,"Player %s needs for medics.",name);
SendFMessage(i,COLOR_SYSTEM,"Location %s.",place);
SystemMsg(playerid,"You have called for a medics. Do not move and wait for them.");
}
else
{
//Send message to player that no medics are connected
}