Du hattest es bei den unteren beiden entfernt, da habe ich natürlich nicht drauf geachtet.
public OnPlayerEnterCheckpoint(playerid)
{
if(GetPVarInt(playerid, "trash_job"))
{
//Wenn trash job ausgeführt wird
new cID = GetPVarInt(playerid, "trash_cp");
if(IsPlayerInRangeOfPoint(playerid, 5, tCPs[cID][t_x], tCPs[cID][t_y], tCPs[cID][t_z]))
{
cID++;
if(cID >= sizeof(tCPs))
{
GivePlayerMoney(playerid, 3000);
SetPVarInt(playerid, "trash_cp", 0);
SetPlayerCheckpoint(playerid, tCPs[0][t_x], tCPs[0][t_y], tCPs[0][t_z], 5);
SendClientMessage(playerid,helblau,"Du hast soeben 3.000$ verdient");
}
else
{
SetPVarInt(playerid, "trash_cp", cID);
SetPlayerCheckpoint(playerid, tCPs[cID][t_x], tCPs[cID][t_y], tCPs[cID][t_z], 5);
}
return 1;
}
}
if(GetPVarInt(playerid,"bus_job") == 1)
{
//wenn bus_job ausgeführt wird.
new bID = GetPVarInt(playerid,"bus_cp");
if(IsPlayerInRangeOfPoint(playerid,7,bust1cps[bID][g_x],bust1cps[bID][g_y],bust1cps[bID][g_z]))
{
bID++;
if(bID >= sizeof(bust1cps))
{
GivePlayerMoney(playerid,6000);
SetPVarInt(playerid,"bus_cp",0);
SetPlayerCheckpoint(playerid,bust1cps[0][g_x],bust1cps[0][g_y],bust1cps[0][g_z],5);
SendClientMessage(playerid,rot,"Du hast soeben 6.000$ verdient");
}
else
{
SetPVarInt(playerid,"bus_cp",bID);
SetPlayerCheckpoint(playerid,bust1cps[bID][g_x],bust1cps[bID][g_y],bust1cps[bID][g_z],5);
}
}
}
else if(GetPVarInt(playerid,"bus_job") == 2)
{
//wenn bus_job ausgeführt wird.
new bID = GetPVarInt(playerid,"bus_cp");
if(IsPlayerInRangeOfPoint(playerid,7,bust2cps[bID][v_x],bust2cps[bID][v_y],bust2cps[bID][v_z]))
{
bID++;
if(bID >= sizeof(bust2cps))
{
GivePlayerMoney(playerid,12000);
SetPVarInt(playerid,"bus_cp",0);
SetPlayerCheckpoint(playerid,bust2cps[0][v_x],bust2cps[0][v_y],bust2cps[0][v_z],5);
SendClientMessage(playerid,rot,"Du hast soeben 12.000$ verdient");
}
else
{
SetPVarInt(playerid,"bus_cp",bID);
SetPlayerCheckpoint(playerid,bust2cps[bID][v_x],bust2cps[bID][v_y],bust2cps[bID][v_z],5);
}
}
}
else if (GetPVarInt(playerid,"bus_job") == 3)
{
new bID = GetPVarInt(playerid,"bus_cp");
if(IsPlayerInRangeOfPoint(playerid,7,bust3cps[bID][n_x],bust3cps[bID][n_y],bust3cps[bID][n_z]))
{
bID++;
if(bID >= sizeof(bust3cps))
{
GivePlayerMoney(playerid,15000);
SetPVarInt(playerid,"bus_cp",8);
SetPlayerCheckpoint(playerid,bust3cps[bID][n_x],bust3cps[bID][n_y],bust3cps[bID][n_z],5);
SendClientMessage(playerid,rot,"Du hast soeben 15.000$ verdient");
}
else
{
SetPVarInt(playerid,"bus_cp",bID);
SetPlayerCheckpoint(playerid,bust3cps[bID][n_x],bust3cps[bID][n_y],bust3cps[bID][n_z],5);
}
}
}
else if(GetPVarInt(playerid,"bus_job") == 4)
{
new bID = GetPVarInt(playerid,"bus_cp");
if(IsPlayerInRangeOfPoint(playerid,7,bust4cps[bID][m_x],bust4cps[bID][m_y],bust4cps[bID][m_z]))
{
bID++;
if(bID >= sizeof(bust4cps))
{
GivePlayerMoney(playerid,30000);
SetPVarInt(playerid,"bus_cp",8);
SetPlayerCheckpoint(playerid,bust4cps[bID][m_x],bust4cps[bID][m_y],bust4cps[bID][m_z],5);
SendClientMessage(playerid,rot,"Du hast soeben 30.000$ verdient");
}
else
{
SetPVarInt(playerid,"bus_cp",bID);
SetPlayerCheckpoint(playerid,bust4cps[bID][m_x],bust4cps[bID][m_y],bust4cps[bID][m_z],5);
}
}
}
DisablePlayerCheckpoint(playerid);
return 1;
}