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

2 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;
        }

 

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.