public OnPlayerEnterCheckpoint(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid),string[256];
if(Spieler[playerid][pInPrison] == 1)
{
new rSpawn = random(sizeof(Prisoncheckpoints));
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,Prisoncheckpoints[rSpawn][0],Prisoncheckpoints[rSpawn][1],Prisoncheckpoints[rSpawn][2],1.0);
Spieler[playerid][pPrisonCPsgelaufen]--;
format(string,sizeof(string),"~w~Checkpoints: ~y~%i von ~r~%i",Spieler[playerid][pPrisonCPsgelaufen],Spieler[playerid][pPrisonCPsgegeben]);
PlayerTextDrawSetString(playerid,PRISONdraw[playerid],string);
if(Spieler[playerid][pPrisonCPsgelaufen] <= 0)
{
StopAudioStreamForPlayer(playerid);
RemovePlayerAttachedObject(playerid,0);
Spieler[playerid][pPrisonDMWarns] = 0;
Spieler[playerid][pPrisonCPsgelaufen] = 0;
Spieler[playerid][pPrisonCPsgegeben] = 0;
Spieler[playerid][pInPrison] = 0;
SetPlayerVirtualWorld(playerid,0);
SCM(playerid,SAMP_WEISS,""IINFO" du hast deine Strafe beendet, benehme dich in Zukunft!");
DisablePlayerCheckpoint(playerid);
SpawnPlayerEx(playerid);
}
return 1;
}
if(CP_MakeRace[playerid] == true)
{
return 0;
}
if(Spieler[playerid][pTutMissionComplete][0] == true)
{
//(Quest Step 1(Teil 1))
DisablePlayerCheckpoint(playerid);
tutorialpickup[playerid][0] = CreateDynamicPickup(1550,1,3562.4568,-987.5737,618.4721,GetPlayerVirtualWorld(playerid));
SetPlayerPos(playerid,3562.4568,-987.5737,618.4721);
Spieler[playerid][pTutTimer4All] = SetTimerEx("Tutorial4All",2500,0,"ii",playerid,4);
TogglePlayerControllable(playerid,0);
SpamChat(playerid,0);
return 1;
}
if(Spieler[playerid][pTutMissionComplete][1] == true)
{
//(Quest Step 1(Teil 2))
DisablePlayerCheckpoint(playerid);
tutorialpickup[playerid][1] = CreateDynamicPickup(1461,1,3562.4568,-987.5737,618.4721,GetPlayerVirtualWorld(playerid));
SetPlayerPos(playerid,3562.4568,-987.5737,618.4721);
Spieler[playerid][pTutTimer4All] = SetTimerEx("Tutorial4All",5000,0,"ii",playerid,4);
TogglePlayerControllable(playerid,0);
return 1;
}
if(Spieler[playerid][pTutMissionComplete][2] == true)
{
//(Quest Step 1(Teil 3))
DisablePlayerCheckpoint(playerid);
Spieler[playerid][pTutMissionComplete][2] = false;
//SCM(playerid,SAMP_WEISS,""#HTML_BLAU"Pilot"#HTML_WEISS": Okay, wir sind nun über Los-Santos machen sie sich absprung bereit!");
SetPlayerPos(playerid,3562.4568,-987.5737,618.4721);
Spieler[playerid][pTutTimer4All] = SetTimerEx("Tutorial4All",5000,0,"ii",playerid,4);
TogglePlayerControllable(playerid,0);
SetPlayerCheckpoint(playerid,3562.4568,-987.5737,618.4721,3.0);
Spieler[playerid][pTutMissionComplete][3] = true;
return 1;
}
if(Spieler[playerid][pTutMissionComplete][3] == true)
{
DisablePlayerCheckpoint(playerid);
for(new i=3;i<154;i++)
{
DestroyPlayerObject(playerid,Spieler[playerid][pTutorialObject][i]);
}
//(Quest Step 1(Teil 4))
Spieler[playerid][pTutMissionComplete][3] = false;
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,3562.4568,-987.5737,618.4721);
Spieler[playerid][pTutTimer4All] = SetTimerEx("Tutorial4All",1000,1,"ii",playerid,5);
TogglePlayerControllable(playerid,0);
Spieler[playerid][pTutMissionComplete][4] = true;
SetPVarInt(playerid,"Eingeloggt",1);
SetTimerEx("SpielerFertig",15000,0,"i",playerid);
}
if(Spieler[playerid][pBuyVehicleCP] == 1)
{
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
DisablePlayerCheckpoint(playerid);
SCM(playerid,SAMP_WEISS,"Fahrzeug Befehle:");
SCM(playerid,SAMP_WEISS,"- '/pveh' um dein Fahrzeug zu verwalten");
SCM(playerid,SAMP_WEISS,"Weiteres in '/hilfe'");
Spieler[playerid][pBuyVehicleCP] = 0;
}
if(Spieler[playerid][pFBuyCheckPoint] == 1)
{
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
DisablePlayerCheckpoint(playerid);
SCM(playerid,SAMP_WEISS,"Fraktionfahrzeug Befehle:");
SCM(playerid,SAMP_WEISS,"- '/flock' zum Auf- und Abschließen einzelner Fraktionsfahrzeuge");
SCM(playerid,SAMP_WEISS,"- '/fparken' zum Parken einzelner Fraktionsfahrzeuge");
SCM(playerid,SAMP_WEISS,"- '/frespawn' zum Respawn aller Fraktionsfahrzeuge der Gang/Mafia/Fraktion");
SCM(playerid,SAMP_WEISS,"- '/fvehlist' gibt Info´s zu Fraktionfahrzeugen (Fahrzeugname,Tankzustand,Abgeschleppt:Ja/Nein,Status:Abgeschlossen/Aufgeschlossen)");
Spieler[playerid][pFBuyCheckPoint] = 0;
}
if(Spieler[playerid][pWaitEating] == 1)
{
DisablePlayerCheckpoint(playerid);
SCM(playerid,SAMP_WEISS,""IINFO" warte einen Moment! Dein Essen wird zubereitet.");
TogglePlayerControllable(playerid,0);
SetTimerEx("DriveIn",5000,0,"i",playerid);
if(Spieler[playerid][pIsearch] == 1)
{
new Float:x,Float:y,Float:z;
if(Spieler[playerid][pOrtenVehORPlayer] == 1)//ortet player
{
GetPlayerPos(Spieler[playerid][pOrtenVehIDplayerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,3);
SpielerOrtenTimer[playerid]=SetTimerEx("SpielerOderFahrzeugOrten",1000,1,"iii",playerid,Spieler[playerid][pOrtenVehIDplayerid],1);
return 1;
}
if(Spieler[playerid][pOrtenVehORPlayer] == 2)//ortet fahrzeug
{
GetVehiclePos(Spieler[playerid][pOrtenVehIDplayerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,3);
SpielerOrtenTimer[playerid]=SetTimerEx("SpielerOderFahrzeugOrten",1000,1,"iii",playerid,Spieler[playerid][pOrtenVehIDplayerid],2);
return 1;
}
if(Spieler[playerid][pOrtenVehORPlayer] == 3)//service accept
{
GetPlayerPos(Spieler[playerid][pOrtenVehIDplayerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,3);
GameTextForPlayer(playerid,"~g~Fahre zum Einsatzort",2500,1);
return 1;
}
}
}
und das habe ich noch
public OnPlayerExitedMenu(playerid)
{
new Float:x,Float:y,Float:z,seatid,vehicleid;
if(Spieler[playerid][pIsearch] == 1)
{
KillTimer(SpielerOrtenTimer[playerid]);
if(Spieler[playerid][pOrtenVehORPlayer] == 1)//ortet player
{
GetPlayerPos(Spieler[playerid][pOrtenVehIDplayerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,3);
SpielerOrtenTimer[playerid]=SetTimerEx("SpielerOderFahrzeugOrten",1000,1,"iii",playerid,Spieler[playerid][pOrtenVehIDplayerid],1);
}
if(Spieler[playerid][pOrtenVehORPlayer] == 2)//ortet fahrzeug
{
GetVehiclePos(Spieler[playerid][pOrtenVehIDplayerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,3);
SpielerOrtenTimer[playerid]=SetTimerEx("SpielerOderFahrzeugOrten",1000,1,"iii",playerid,Spieler[playerid][pOrtenVehIDplayerid],2);
}
if(Spieler[playerid][pOrtenVehORPlayer] == 3)//service accept
{
GetPlayerPos(Spieler[playerid][pOrtenVehIDplayerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,3);
GameTextForPlayer(playerid,"~g~Fahre zum Einsatzort",2500,1);
}
}
if(IsPlayerInAnyVehicle(playerid)) seatid = GetPlayerVehicleSeat(playerid),vehicleid = GetPlayerVehicleID(playerid);
TogglePlayerControllable(playerid,1);
StopLoopingAnim(playerid);
if(IsValidVehicle(vehicleid)) PutPlayerInVehicleEx(playerid,vehicleid,seatid);
DisablePlayerCheckpoint(playerid);
if(FschulProbLic[playerid] != 0)
{
SCM(playerid,SAMP_WEISS,""IINFO" du hast deine Prüfung abgebrochen! Du hast nicht bestanden.");
TextDrawShowForPlayer(playerid,InfoSign);
PlayerTextDrawSetString(playerid,INFOdraw[playerid][2],"~r~Du bist Durchgefallen!");
StopAudioStreamForPlayer(playerid);
PlayerTextDrawShow(playerid,INFOdraw[playerid][2]);
SetTimerEx("HideInfoBox",3000,0,"i",playerid);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPosEx(playerid,-2033.4276,-117.4092,1035.1719);
SetCameraBehindPlayer(playerid);
Spieler[playerid][InFahrSchulPruefung] = 0;
FschulTutTime[playerid] = 0;
FschulProbLic[playerid] = 0;
}
return 1;
}