Jump to content
  • 0

Cum pun sa trimita mesaj la cel care foloseste /service medic si medicul ajunge la el?


Question

Posted (edited)

salutare,

Cum pun sa trimita mesaj la cel care foloseste /service medic cand medicul ajunge la el?

 

COD: 

Quote

 

                case 8: {
                    if(MedicCall[idz] == idz) {
                        if(PlayerInfo[playerid][pMember] != 😎 return SCM(playerid, COLOR_WHITE, "Nu esti medic!");
                        if(MedicCallTime[playerid] > 0) return SCM(playerid, COLOR_WHITE, "You have already accepted a medic call.");
                        if(!IsAnAmbulance(GetPlayerVehicleID(playerid))) return SCM(playerid,COLOR_WHITE, "You're not in ambulance car.");
                        if(MedicCall[idz] != idz) return SCM(playerid,COLOR_WHITE, "This player has not called ambulance.");
                    
                        format(string, sizeof(string), "**(( Paramedic Dispatch: Paramedic %s (%d) i-a acceptat comanda lui %s (%d). ))**",GetName(playerid), playerid, GetName(idz), idz);
                        SendFactionMessage(8, COLOR_LIGHTBLUE, string);
                        
                        format(string, sizeof(string), "* Medicul %s ti-a acceptat comanda.",GetName(playerid));
                        SCM(MedicCall[idz], COLOR_YELLOW, string);
                        
                        TimerFind[playerid] = SetTimerEx("FindPlayer", 1000, true, "i", playerid);
                        CP[playerid] = 4;

                        targetfind[playerid] = idz;
                        UsedFind[playerid] = 1;

                        MedicCallTime[playerid] = 1;
                        MedicCall[idz] = -1;
                    }
                    else return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu a apelat la serviciile factiunii tale sau comanda lui a fost accepta de altcineva!");
                }    

 

 

si cand intra in checkpoint:

Quote

 

        case 4: {

            // AICI SA-I TRIMITA MESAJ JUCATORULUI CARE FOLOSESTE /SERVICE MEDIC 

           // Medicul %s a ajuns la tine;
            KillTimer(TimerFind[playerid]);
            DisablePlayerCheckpointEx(playerid);
            CP[playerid] = 0;
            PlayerTextDrawHide(playerid, FindTD);
            targetfind[playerid] = -1;
            UsedFind[playerid] = 0;
            AcceptedService[playerid] = -1;
            AcceptedTaxiService[playerid] = 0;
            TaxiService[playerid] = 0;
            InstructorCall[playerid] = -1;
            MedicCallTime[playerid] = 0;
            MedicCall[playerid] = 0;
            MechanicCallTime[playerid] = 0;
            MechanicCall[playerid] = -1;
        }

 

 

Edited by cstef4n

4 answers to this question

Recommended Posts

  • 0
Posted
        case 4: {
            if(targetfind[playerid] != -1) {
                format(string, sizeof(string), "* Medicul %s a ajuns la tine.", GetName(playerid));
                SCM(targetfind[playerid], COLOR_YELLOW, string);
            }

            KillTimer(TimerFind[playerid]);
            DisablePlayerCheckpointEx(playerid);
            CP[playerid] = 0;
            PlayerTextDrawHide(playerid, FindTD);
            targetfind[playerid] = -1;
            UsedFind[playerid] = 0;
            AcceptedService[playerid] = -1;
            AcceptedTaxiService[playerid] = 0;
            TaxiService[playerid] = 0;
            InstructorCall[playerid] = -1;
            MedicCallTime[playerid] = 0;
            MedicCall[playerid] = 0;
            MechanicCallTime[playerid] = 0;
            MechanicCall[playerid] = -1;
        }

 

  • 0
Posted

case 8: { // Verificam daca exista un apel medical activ pentru acest player if (MedicCall[idz] != idz) return SCM(playerid, COLOR_WHITE, "Acest player nu a solicitat ambulanta."); // Verificam daca playerul este medic if (PlayerInfo[playerid][pMember] != 😎 return SCM(playerid, COLOR_WHITE, "Nu esti medic!"); // Verificam daca medicul are deja un apel acceptat if (MedicCallTime[playerid] > 0) return SCM(playerid, COLOR_WHITE, "Ai acceptat deja un apel medical!"); // Verificam daca medicul se afla intr-o ambulanta if (!IsAnAmbulance(GetPlayerVehicleID(playerid))) return SCM(playerid, COLOR_WHITE, "Nu esti intr-o ambulanta!"); // Anuntam factiunea ca apelul a fost acceptat new string[256]; format( string, sizeof(string), "* [Paramedic Dispatch]: Paramedicul %s (%d) a acceptat comanda lui %s (%d)! *", GetName(playerid), playerid, GetName(idz), idz ); SendFactionMessage(8, COLOR_LIGHTBLUE, string); // Anuntam playerul care a solicitat ambulanta format( string, sizeof(string), "Medicul %s vine catre tine. Te rugam sa astepti ambulanta.", GetName(playerid) ); SCM(idz, COLOR_YELLOW, string); // Pornim cautarea playerului TimerFind[playerid] = SetTimerEx( "FindPlayer", 1000, true, "ii", playerid, idz ); // Setam checkpoint-ul pentru medic CP[playerid] = 4; // Salvam playerul catre care se indreapta medicul targetfind[playerid] = idz; // Marcam ca medicul are un apel activ UsedFind[playerid] = 1; MedicCallTime[playerid] = 1; // Apelul a fost preluat MedicCall[idz] = -1;

  • 0
Posted
On 21.07.2026 at 14:45, ahmesito said:
        case 4: {
            if(targetfind[playerid] != -1) {
                format(string, sizeof(string), "* Medicul %s a ajuns la tine.", GetName(playerid));
                SCM(targetfind[playerid], COLOR_YELLOW, string);
            }

            KillTimer(TimerFind[playerid]);
            DisablePlayerCheckpointEx(playerid);
            CP[playerid] = 0;
            PlayerTextDrawHide(playerid, FindTD);
            targetfind[playerid] = -1;
            UsedFind[playerid] = 0;
            AcceptedService[playerid] = -1;
            AcceptedTaxiService[playerid] = 0;
            TaxiService[playerid] = 0;
            InstructorCall[playerid] = -1;
            MedicCallTime[playerid] = 0;
            MedicCall[playerid] = 0;
            MechanicCallTime[playerid] = 0;
            MechanicCall[playerid] = -1;
        }

 

🤔

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.