Jump to content
  • 0

Problema /gps


Iulian2

Question

CMD:gps(playerid, params[]) {
    if(HaveCP(playerid)) return SCM(playerid, COLOR_ERROR, "Error: You have an active checkpoint.");
    if(Iter_Count(ServerGPSLocations) == 0) return SCM(playerid, COLOR_ERROR, "Error: There it's not any location in gps.");
    new dialog[2048], string[80];
    strcat(dialog, "Location\tDistance\n");
    for(new i = 1; i <= Iter_Count(ServerGPSLocations); i++) {
        format(string, sizeof(string), "{FFFFFF}%s\t{008080}%.2f\n", gpsInfo[gName], GetPlayerDistanceFromPoint(playerid, gpsInfo[gX], gpsInfo[gY], gpsInfo[gZ]));
        strcat(dialog, string);
    }
    ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_TABLIST_HEADERS, "Locations", dialog, "Select", "Close");
    return 1;
}

Ce trebuie sa fac sa imi apara locatiile?

sa-mp-188.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
La 12.05.2019 la 13:00, Azze47 a spus:

Stiu gm-ul, dai la dialog_gps si vezi acolo ce iti da !

    case DIALOG_GPS: {
            if(!response) return 1;
            new i = listitem + 1;
            SCM(playerid, COLOR_SHITBLUE, "(GPS) {FFFFFF}You selected location %s, that is at %.2fm.", gpsInfo[gName], GetPlayerDistanceFromPoint(playerid, gpsInfo[gX], gpsInfo[gY], gpsInfo[gZ]));
            SetPlayerCheckpoint(playerid, gpsInfo[gX], gpsInfo[gY], gpsInfo[gZ], gpsInfo[gRange]);
            CP[playerid] = 43;
        }

Link to comment
Share on other sites

  • 0

distanta pana la locatie iti apare verifica variabila asta  gpsInfo[gName]  la tine pare a fi NULL

Citat
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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