Hallo. Wie bringe ich den Unreachable Code warning weg?
Script:
public OnPlayerEnterCheckpoint(playerid)
{
if(GetPVarInt(playerid, "fege_job"))
{
//Wenn trash job ausgeführt
new cID = GetPVarInt(playerid,"fege_cp");
cID++;
if(cID >= sizeof(fCPs))
{
new trinkgeld = random(10);
GivePlayerMoney(playerid, 10+trinkgeld);
SetPVarInt(playerid,"fege_cp",0);
ShowPlayerDialog(playerid,DIALOG_FFEGEN,DIALOG_STYLE_MSGBOX,"Fege-Job","Du hast also das Gefängnis durchfegt, ja?\nGut! Hier hast du ein bisschen Geld.\nSeh es als eine Belohnung!","Okay","Abbrechen");
SetPlayerCheckpoint(playerid, fCPs[0][f_x],fCPs[0][f_y],fCPs[0][f_z], 5);
}
else
{
SetPVarInt(playerid,"fege_cp",cID);
SetPlayerCheckpoint(playerid, fCPs[cID][f_x],fCPs[cID][f_y],fCPs[cID][f_z], 5);
}
return 1;
}
DisablePlayerCheckpoint(playerid);
return 1;
if(GetPVarInt(playerid, "muell_job"))
{
//Wenn trash job ausgeführt
new cID = GetPVarInt(playerid,"muell_cp");
cID++;
if(cID >= sizeof(fCPs))
{
new muellgeld = random(10);
GivePlayerMoney(playerid, 200+muellgeld);
SetPVarInt(playerid,"muell_cp",0);
ShowPlayerDialog(playerid,DIALOG_FFEGEN,DIALOG_STYLE_MSGBOX,"Muell-Job","Du hast den Müll der Stadt erfolgreich beseitigt.\nDein Geld solltest du erhalten haben.","Okay","Abbrechen");
SetPlayerCheckpoint(playerid, fCPs[0][f_x],fCPs[0][f_y],fCPs[0][f_z], 5);
}
else
{
SetPVarInt(playerid,"muell_cp",cID);
SetPlayerCheckpoint(playerid, mCPs[cID][m_x],mCPs[cID][m_y],mCPs[cID][m_z], 5);
}
return 1;
}
DisablePlayerCheckpoint(playerid);
return 1;
}
MFG