31.03.2013, 22:16
Criei aqui a profissгo medico tudo certinho, apos o player pedir /medico, aparece a mensagem para os medicos, o player que pediu fica vermelho, etc.
Na hora do medico curar o player que pediu /medico, ele cura e tal. Mais o nick do player continua vermelho...
Ajuda?
Na hora do medico curar o player que pediu /medico, ele cura e tal. Mais o nick do player continua vermelho...
pawn Код:
forward Medic_CheckPlayers(playerid);
public Medic_CheckPlayers(playerid)
{
// Scan through all players
for (new PlayerToCheckk; PlayerToCheckk < MAX_PLAYERS; PlayerToCheckk++)
{
// check if this player is connected
if (IsPlayerConnected(PlayerToCheckk))
{
//Check if that player needs assistance
if (APlayerData[PlayerToCheckk][MedicNeeded] == true)
SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, 0xFF0000FF); // Make that player red to the medic-player
else
{
// Reset the playercolor based on the player's class
switch (APlayerData[PlayerToCheckk][PlayerClass])
{
case ClassTruckDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassTruckDriver);
case ClassBusDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassBusDriver);
case ClassPilot: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassPilot);
case ClassPolice: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassPolice);
case ClassMafia: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassMafia);
case ClassCourier: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassCourier);
case ClassAssistance: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassAssistance);
case ClassMedic: SetPlayerMarkerForPlayer(playerid, PlayerToCheckk, ColorClassMedic);
}
}
}
}
}