Tolles FS, ich habe auch gleich meine eigene Route gemacht, nur leider wenn ich durch den ersten Checkpoint fahre, wird das nächste nicht angezeigt! Woran kann das liegen? Hier das FS:
#include <a_samp>
new Checkpoint[MAX_PLAYERS];
new bool:mission[MAX_PLAYERS];
#define COLOR_LIGHTGREEN 0x86FF59FF
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00CA00FF
#define COLOR_GREY 0xAFAFAFAA
forward missionfailed(playerid);
enum e_Muell {
Float:X,
Float:Y,
Float:Z,
Float:Rad
}
new
Muellabfuhr_Stationen[][e_Muell] = {
{-1675.9446, 1978.6151,20.1667, 6.0},
{-1468.5815, 1871.0692,32.6328, 6.0},
{-1213.6675, 1823.7319, 41.7188, 6.0},
{-778.8741, 1610.0878, 27.1172, 6.0},
{-801.8519, 1495.4368, 21.2567, 6.0},
{-857.3732, 1553.0625, 23.7072, 6.0},
{-306.4199, 827.5003, 13.4559, 6.0},
{-186.6008, 1076.0029, 19.5962, 6.0},
{-82.5426, 1132.7013, 19.7422, 6.0},
{-159.6194, 1213.8042, 19.7422, 6.0},
{-1929.8319, 2386.8579, 49.4922, 6.0}
};
public OnFilterScriptInit()
{
//Message in server window
print(" |________________________________|");
print(" |____Muellabfuhr, by AlexandA____|");
print(" |_________www.GGE-RL.de__________|");
print(" | fixed & improved by Goldkiller |");
CreateVehicle(408,-1925.6149,2358.5615,49.5845,291.3066,1,1,-1);
CreateVehicle(408,-1927.0433,2362.2393,49.6910,292.0163,1,1,-1);
CreateVehicle(408,-1929.4833,2368.2668,49.9778,291.0787,1,1,-1);
CreateVehicle(408,-1930.8248,2371.6880,50.0431,291.3656,1,1,-1);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
new
vehicleid = GetPlayerVehicleID(playerid),
model = GetVehicleModel(vehicleid);
if (strcmp("/starten", cmdtext, true, 8) == 0) {
if(!mission[playerid]) {
if(model == 408) {
Checkpoint[playerid]=0;
mission[playerid]=true;
SendClientMessage(playerid, COLOR_GREY, "Müllabfuhr gestartet, fahre nun die roten Checkpoints ab!");
SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[0][X],Muellabfuhr_Stationen[0][Y],Muellabfuhr_Stationen[0][Z],Muellabfuhr_Stationen[0][Rad]);
}
else {
SendClientMessage(playerid, COLOR_GREY, "Du bist nicht in einem Müllwagen!");
}
}
else {
SendClientMessage(playerid, COLOR_GREY, "Es läuft schon eine Mission!");
}
return 1;
}
if (strcmp("/deponie", cmdtext, true, 8) ==0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid, -1929.8319, 2386.8579, 49.4922);
return 1;
}
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid) {
if(GetVehicleModel(vehicleid) == 408) {
if (mission[playerid]) {
SendClientMessage(playerid, COLOR_GREY, "Du hast 15 Sekunden um zurück in das Müllauto zu steigen!");
SetTimerEx("missionfailed",15*1000,0,"d",playerid); //
}
return 1;
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid) {
new
string[128];
Checkpoint[playerid]++;
if(Checkpoint[playerid]==sizeof(Muellabfuhr_Stationen)) {
SendClientMessage(playerid, COLOR_GREY, "Vielen Dank das du hilfst, die Stadt sauber zu halten!");
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 1975);
SendClientMessage(playerid, COLOR_GREY, "Hier bekommst du einen kleinen Bonus von 200$");
mission[playerid]=false;
}
else {
new
trinkgeld = random(85);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "Müll aufgeladen, weiter zum nächsten Checkpoint!");
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
GivePlayerMoney(playerid,trinkgeld);
SendClientMessage(playerid, COLOR_GREY, string);
SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[Checkpoint[playerid]][X],Muellabfuhr_Stationen[Checkpoint[playerid]][Y],Muellabfuhr_Stationen[Checkpoint[playerid]][Z],Muellabfuhr_Stationen[Checkpoint[playerid]][Rad]);
}
return 1;
}
public missionfailed(playerid) {
new
vehicleid = GetPlayerVehicleID(playerid),
model = GetVehicleModel(vehicleid);
if(model!=408) {
SendClientMessage(playerid, COLOR_GREY, "Müllmission gescheitert!");
DisablePlayerCheckpoint(playerid);
mission[playerid]=false;
}
return 1;
}
Danke für eure Hilfe!