[Ajuda] Problemas com profissгo
#1

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...

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);
                }
            }
        }
    }
}
Ajuda?
Reply
#2

Se que criou isso ae?
Reply
#3

Nгo exatamente, peguei de base da profissгo mecanico que ja tem no servidor..
@Topic, nгo consigo achar o erro, o player й curado mais ainda continua com nick vermelho...
Reply
#4

Pelo que vejo estб certo,
Mas uma pergunta, qual foi a cor que voce definiu em:
pawn Код:
#define ColorClassMedic
?
Reply
#5

pawn Код:
#define ColorClassMedic             0xAA00FFFF
Tem algo errado ?
Reply
#6

Quote:
Originally Posted by feliphemort
Посмотреть сообщение
pawn Код:
#define ColorClassMedic             0xAA00FFFF
Tem algo errado ?
Nгo,
e no gamemode? voce colocou basicamente isto:
pawn Код:
if (((newkeys & KEY_HANDBRAKE) && !(oldkeys & KEY_HANDBRAKE)) && (GetPlayerVehicleID(playerid) == 0))
                Medico_FixVehicle(playerid);
Reply
#7

pawn Код:
case ClassMedic:
        {
            // If the assistance-player pressed the RMB key (AIM key) when OUTSIDE his vehicle
            if((newkeys & KEY_HANDBRAKE) && !(oldkeys & KEY_HANDBRAKE))
                Medic_Health(playerid);
        }
Reply
#8

Oks!

Criou o SetTimeEx direitinho exatamente como da profissao 'mecanico' no gamemode ?

Ex:
pawn Код:
APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Assistance_CheckPlayers", 1000, true, "i", playerid);
Reply
#9

Sim, no OnPlayerSpawn

pawn Код:
case ClassMedic: // Medic class
        {
            format(missiontext, sizeof(missiontext), Medic_NoJobText); // Preset the missiontext
            SetPlayerColor(playerid, ColorClassMedic); // Set the playercolor (chatcolor for the player and color on the map)
            KillTimer(APlayerData[playerid][PlayerCheckTimer]);
            APlayerData[playerid][PlayerCheckTimer] = SetTimerEx("Medic_CheckPlayers", 1000, true, "i", playerid);
        }
@Off , Me aceita skype.
Reply
#10

Manda o teu Medic_Health(playerid) .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)