Guten Tag liebe Breadfish Community,
ich hab ein Problem mit meinem Checkpoint Prison.
Undzwar hab ichs zurzeit als Random drinnen das die Checkpoints Random dran kommen, das will ich aber nicht mehr will das es nach der reinfolge kommt.
Habs selber schon paar mal versucht aber immer 26 Error´s.
Hier Info´s:
if(Spieler[playerid][pInPrison] == 1)
{
if(Spieler[playerid][pMaske] == 1 || Spieler[playerid][pDuty] == 4)
{
SetPlayerName(playerid,Spieler[playerid][pName]);
SetPlayerScore(playerid,GetPlayerLevel(playerid));
}
if(Spieler[playerid][pDuty] == 1 && isPlayerInFrakt(playerid,14)) if(IsValidDynamic3DTextLabel(fSCHULleher[playerid])) DestroyDynamic3DTextLabel(fSCHULleher[playerid]);
ResetWeapons(playerid,false);
if(!isPlayerInFrakt(playerid,16)) Spieler[playerid][pDuty] = 0;
Spieler[playerid][pMaske] = 0;
Spieler[playerid][pHaveMaske] = 0;
GangZoneStopFlashForPlayer(playerid,Friedhofszone);
GangZoneHideForPlayer(playerid,Friedhofszone);
SetPlayerColor(playerid,SAMP_WEISS);
SetPlayerPosEx(playerid,-1404.0436,-255.9747,1043.6439);
SetPlayerInterior(playerid,7);
Spieler[playerid][pHandystate] = 0;
SetPlayerVirtualWorld(playerid,0);
new changeskin = random(11);
switch(changeskin)
{
case 0: SetPlayerSkin(playerid,26);
case 1: SetPlayerSkin(playerid,51);
case 2: SetPlayerSkin(playerid,78);
case 3: SetPlayerSkin(playerid,94);
case 4: SetPlayerSkin(playerid,101);
case 5: SetPlayerSkin(playerid,137);
case 6: SetPlayerSkin(playerid,167);
case 7: SetPlayerSkin(playerid,205);
case 8: SetPlayerSkin(playerid,264);
case 9: SetPlayerSkin(playerid,239);
case 10: SetPlayerSkin(playerid,230);
case 11: SetPlayerSkin(playerid,289);
}
HideServerTD(playerid);
SetPlayerWorldBounds(playerid,-496.2992,638.8791,-2318.0630,-1075.9543);
PlayerTextDrawShow(playerid,PRISONdraw[playerid]);
format(string,sizeof(string),"~w~Checkpoints: ~y~%i ~w~von ~r~%i",Spieler[playerid][pPrisonCPsgelaufen],Spieler[playerid][pPrisonCPsgegeben]);
PlayerTextDrawSetString(playerid,PRISONdraw[playerid],string);
new rSpawn = random(sizeof(Prisoncheckpoints));
SetPlayerCheckpoint(playerid,Prisoncheckpoints[rSpawn][0],Prisoncheckpoints[rSpawn][1],Prisoncheckpoints[rSpawn][2],Prisoncheckpoints[rSpawn][3],1.0);
GameTextForPlayer(playerid,"~w~Im ~r~Prison",1500,3);
SendClientMessage(playerid,SAMP_WEISS,"Du bist im Prison.");
format(string,sizeof(string),"Du musst noch %i von %i Checkpoints ablaufen.",Spieler[playerid][pPrisonCPsgelaufen],Spieler[playerid][pPrisonCPsgegeben]);
SendClientMessage(playerid,WEISS,string);
SendClientMessage(playerid,WEISS,"");
KillTimer(AkkuTimer[playerid]);
HideHandyDraw(playerid);
return 1;
}
public OnPlayerEnterCheckpoint:
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],Prisoncheckpoints[rSpawn][3],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);
GameTextForPlayer(playerid,"~w~Du wurdest aus dem ~g~Prison~w~ entlassen!",1500,3);
PlayerTextDrawHide(playerid,PRISONdraw[playerid]);
DisablePlayerCheckpoint(playerid);
SpawnPlayerEx(playerid);
}
return 1;
}