14.02.2011, 19:20
They dont work...
pawn Код:
dcmd_medic(playerid, params[])
{
#pragma unused params
if(gTeam[playerid] == TEAM_MEDIC) return SendClientMessage(playerid, COLOR_ERROR, "You is an medic, You dont need to reques other medics, try /commands instead");
else if(HasRequestedMedic[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You have already requested an medic, please sit down and wait");
else
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_MEDIC)
{
new playername[MAX_PLAYER_NAME], string[128];
GetPlayerName(i, playername, sizeof(playername));
format(string, sizeof(string), "%s(%d) has requested medic in %s", playername, playerid, GetPlayerZone(playerid));
SendClientMessage(i, COLOR_GREEN, string);
printf("%s", string);
SendClientMessage(i, COLOR_GREEN, "You have requested an medic");
HasRequestedMedic[playerid] = 1;
return 1;
}
}
return 1;
}
}
pawn Код:
dcmd_food(playerid, params[])
{
#pragma unused params
if(gTeam[playerid] == TEAM_BISTRO) return SendClientMessage(playerid, COLOR_ERROR, "You is an bistro, You cant call for other bistros");
else if(HasRequestedBistro[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You have already requested an bistro, please sit down and wait");
else
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_BISTRO)
{
new playername[MAX_PLAYER_NAME], string[128];
GetPlayerName(i, playername, sizeof(playername));
format(string, sizeof(string), "%s(%d) has requested food in %s", playername, playerid, GetPlayerZone(playerid));
SendClientMessage(i, COLOR_GREEN, string);
printf("%s", string);
SendClientMessage(i, COLOR_GREEN, "You have requested an food");
HasRequestedBistro[playerid] = 1;
return 1;
}
}
return 1;
}
}