Raktam be más koordinátákat is:
#define FILTERSCRIPT
#include <a_samp>
#define DIALOG_RACES 1024
enum Racesi
{
Starti[64],
Endl[64],
Float:startx,
Float:starty,
Float:startz,
Float:endx,
Float:endy,
Float:endz
}
new Races[][Racesi] =
{
{\"Verseny1 Start\",\"Verseny1 Vége\", 4118.9805,-1304.5021,11.0081, 2524.2917,2819.3291,10.8203},
{\"Verseny2 Start\",\"Verseny2 Vége\", 4739.9312,-2368.0493,10.8731, 1066.2122,1241.1855,10.8275},
{\"Verseny3 Start\",\"Verseny3 Vége\", 2524.2917,2819.3291,10.8203, -576.1246,-545.7786,25.5234},
{\"Verseny4 Start\",\"Verseny4 Vége\", 1728.2246,977.7601,10.8203, 2338.1992,73.0833,26.4786},
{\"Verseny5 Start\",\"Verseny5 Vége\", 2728.2246,977.7601,10.8203, -309.1451,1194.3457,19.7422}
};
public OnPlayerCommandText(playerid, cmdtext[]) {
if(!strcmp(cmdtext, \"/races\")) {
new bool:voltmar[128] = {false, ...}, string[1024], rand;
for(new x; x < 3; x++) {
start_:
rand = random(sizeof(Races));
if(voltmar[rand] == true) goto start_;
voltmar[rand] = true;
format(string, sizeof(string), \"%s%s - %s\\n\", string, Races[rand][starti], Races[rand][Endl]);
}
ShowPlayerDialog(playerid, DIALOG_RACES, DIALOG_STYLE_LIST, \"Válassz a veresenyek közül!\", string, \"Tovább\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if(dialogid == DIALOG_RACES && response) {
new line[256], id = -1;
for(new x; x < sizeof(Races); x++) {
format(line, sizeof(line), \"%s - %s\", Races
if(!strcmp(inputtext, line)) {
id = x;
break;
}
}
if(id == -1) print(\"Error\");
else {
RaceIndit(playerid, Races[id][startx], Races[id][starty], Races[id][startz], Races[id][endx], Races[id][endy], Races[id][endz]);
}
}
return 1;
}