Hallo Zusammen...
Habe ein kleines Problem...
vill. kann mir jemand helfen
Ich habe eine mission erstellt also in einem Filterscript, wenn ich die mission mache läuft auch alles wunderbar..
aber sobald ich die mission geschafft habe kann ich sie nicht wiederholen und ich weiss einfach nicht was ich vergessen habe könnt ihr mal schauen ob ihr was findet ?
Danke..
new Float:X,Float:Y,Float:Z;
new MissionGestartet = 0;
new Fortschritt;
new Float:CheckPoints[21][3] =
{
{1568.1874,-1880.8682,13.3769}, // 1 - Checkpoint
{1829.0175,-1682.5017,13.3748}, // 2 - Checkpoint
{1884.4259,-1267.9325,13.3760}, // 3 - Checkpoint
{2148.8633,-1228.1815,23.8082}, // 5 - Checkpoint
{1721.7404,-1716.6000,13.3557}, // 6 - Checkpoint
{2487.7976,-1141.3661,37.8569}, // 7 - Checkpoint
{2944.2080,-622.8129,3.9316}, // 8 - Checkpoint
{2936.2278,-615.2300,5.6435}, // 9 - Checkpoint
{2936.2068,-595.9269,5.9231}, // 10 - Checkpoint
{2925.4463,-586.0629,7.9268}, // 11 - Checkpoint
{2542.6274,50.8263,26.3183}, // 12 - Checkpoint
{2529.5400,119.0717,26.3110}, // 13 - Checkpoint
{2477.0034,103.2198,26.3147}, // 14 - Checkpoint
{2411.7373,49.5209,26.2955}, // 15 - Checkpoint
{2761.7964,-230.8584,23.4423}, // 16 - Checkpoint
{2865.6885,-400.6195,7.5935}, // 17 - Checkpoint
{2815.5645,-1086.9271,30.5965}, // 18 - Checkpoint
{2852.4690,-1308.7723,14.4548}, // 19 - Checkpoint
{2401.2947,-1723.6260,13.4342}, // 20 - Checkpoint
{2015.5417,-1744.4321,13.3786}, // 21 - Checkpoint
{1182.8110,-1323.5271,13.4148} // 22 - Leichen Ausladen...
};
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
//------------------------------------------------------------------------------
print("\n---------------------------------------");
print("Leichenbestatter Mission by Heinz Seidel\n");
print("---------------------------------------\n");
//------------------------------------------------------------------------------
//AddStaticVehicleEx(442,1541.6073,-2338.3010,13.3809,271.3528,11,105,30000); // Leichenwage 1 / Oder in Gamemode einfügen.
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(MissionGestartet == 1)
{
DisablePlayerRaceCheckpoint(playerid);
MissionGestartet = 0;
SendClientMessage(playerid, COLOR_LIGHTRED, "Du hast deinen Leichenwagen verlassen und somit die Mission unterbrochen...");
SendClientMessage(playerid, COLOR_LIGHTRED, "Steige wieder ein und drücke [+] um fortzufahren.");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 442) // Leichenwagen
{
SendClientMessage(playerid, COLOR_GREY, "Drücke [+] um die Leichenbestatter Mission zu starten.");
}
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 442)
{
if(Fortschritt < 19 && MissionGestartet == 1) // Das sind die Standart Checkpoints
{
Fortschritt++;
PlayerPlaySound(playerid, 1149, X, Y, Z);
GivePlayerMoney(playerid, 0);
//GameTextForPlayer(playerid, "~y~150$", 2000, 3);
SendClientMessage(playerid, COLOR_GREY, "Fahre nun weiter, am ende der Mission bekommst du deinen Lohn.");
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[Fortschritt][0], CheckPoints[Fortschritt][1], CheckPoints[Fortschritt][2], CheckPoints[Fortschritt+1][0], CheckPoints[Fortschritt+1][1], CheckPoints[Fortschritt+1][2], 3);
}
else if(Fortschritt == 19 && MissionGestartet == 1) // Das ist der letzt Checkpoint
{
Fortschritt++;
PlayerPlaySound(playerid, 1149, X, Y, Z);
GivePlayerMoney(playerid, 0);
//GameTextForPlayer(playerid, "~y~150$", 2000, 3);
SendClientMessage(playerid, COLOR_YELLOW2, "Fahre nun zum Krankenhaus.");
SetPlayerRaceCheckpoint(playerid, 1, CheckPoints[Fortschritt][0], CheckPoints[Fortschritt][1], CheckPoints[Fortschritt][2], CheckPoints[Fortschritt][0], CheckPoints[Fortschritt][1], CheckPoints[Fortschritt][2], 4);
}
else if(Fortschritt == 20 && MissionGestartet == 1) // Mission Endet ab hier...
{
SetTimerEx("MissionGeschafft", Abladezeit*1000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
GameTextForPlayer(playerid, "~r~Leichen abladen...", Abladezeit*1000, 3);
}
}
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 442 && MissionGestartet == 0)
{
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[Fortschritt][0], CheckPoints[Fortschritt][1], CheckPoints[Fortschritt][2], CheckPoints[Fortschritt+1][0], CheckPoints[Fortschritt+1][1], CheckPoints[Fortschritt+1][2], 3);
MissionGestartet = 1;
GameTextForPlayer(playerid, "~w~Mission ~g~Leichenbestatter ~g~gestartet !", 5000, 3);
SendClientMessage(playerid, COLOR_LIGHTRED, "Deine Ziele werden dir in (rot) auf der (minimap) markiert.");
return 1;
}
else if(MissionGestartet == 1)
{
DisablePlayerRaceCheckpoint(playerid);
MissionGestartet = 0;
}
}
return 1;
}
forward MissionGeschafft(playerid);
public MissionGeschafft(playerid)
{
DisablePlayerRaceCheckpoint(playerid);
GivePlayerMoney(playerid, 5000);
PlayerPlaySound(playerid, 1138, X, Y, Z);
MissionGestartet = 0;
GameTextForPlayer(playerid, "~g~Mission erfolgreich ~g~5000$ ~w~Bonus.", 6000, 3);
TogglePlayerControllable(playerid, true);
return true;
}