Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum e_cp
- {
- e_Location[10],
- Float: cordX,
- Float: cordY,
- Float: cordZ
- }
- static const checkVariables[][e_cp] =
- {
- {"Spin Place", 2128.6445, 1326.6934,10.8416},
- {"Crate Place", 404.8218,2445.1238,16.5000}
- };
- CMD:locations(playerid, params[])
- {
- #pragma unused params
- gString[0] = EOS;
- format(gString, sizeof gString, "Destinatie\tDistance\n");
- for(new i = 0; i < sizeof(checkVariables); i ++)
- {
- format(gString, sizeof gString, "%s%s\t%0.2fm\n", gString, checkVariables[i][e_Location], GetPlayerDistanceFromPoint(playerid, checkVariables[i][cordX], checkVariables[i][cordY], checkVariables[i][cordZ]));
- }
- ShowPlayerDialog(playerid, DIALOG_LOCATIONS, DIALOG_STYLE_TABLIST_HEADERS, "Locations", gString, "Select", "Cancel");
- return 1;
- }
- case DIALOG_LOCATIONS:
- {
- if(!response) return 1;
- SetPlayerCheckpoint(playerid, checkVariables[listitem][cordX], checkVariables[listitem][cordY], checkVariables[listitem][cordZ]);
- gString[0] = EOS;
- format(gString, sizeof gString, "Ti-a fost pus un checkpoint catre locatia aleasa de tine. (%s) distanta (%0.2fm)", checkVariables[listitem][e_Location], GetPlayerDistanceFromPoint(playerid, checkVariables[listitem][cordX], checkVariables[listitem][cordY], checkVariables[listitem][cordZ]));
- SendClientMessage(playerid, COLOR_YELLOW, gString);
- CP[playerid] = 43;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement