Habe vor Paar tagen einen Job schnippsel bekommen von nem kollegen wollte den einbauen und habe ein kleines Problem wenn man /mähen macht und durch den checkpoint fährt löscht sich der checkpoint nicht und erstellt keinen neuen bitte hilft mir .
new KosacPosao[MAX_PLAYERS];
if(!strcmp(cmdtext, "/mähen", true))
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] != 21)
{
SendClientMessage(playerid, COLOR_CRVENA, "[ERROR]:Du bist kein Rasenmäher.");
return 1;
}
if(KosacPosao[playerid] == 1)
{
SendClientMessage(playerid, COLOR_INFO, "[INFO]:Du arbeitest bereits.");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
if(newcar == rasen1 || newcar == rasen2 || newcar == rasen3 || newcar == rasen4)
{
KosacPosao[playerid] = 1;
TogglePlayerControllable(playerid, 1);
new randomize;
randomize = random(sizeof(gKosacCheckPoints));
SetPlayerCheckpoint(playerid, gKosacCheckPoints[randomize][0], gKosacCheckPoints[randomize][1], gKosacCheckPoints[randomize][2], 5.0);
SendClientMessage(playerid, POSAO, "Fahr durch die roten Checkpoints.");
}
}
return 1;
}
if(strcmp(cmd, "/aufhören", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(BusVozacPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
BusVozacPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(KosacPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
KosacPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(CistacPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
CistacPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(SmetlarPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
SmetlarPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(GrobarPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
GrobarPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(PostarPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
PostarPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(UredivacPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
UredivacPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(VozacNaftePosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
VozacNaftePosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(gradevinarPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
gradevinarPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(RibolovacPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
RibolovacPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
if(TramvajVozacPosao[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Du hast aufgehoert zu ~g~arbeiten",5000,4);
TramvajVozacPosao[playerid] = 0;
CP[playerid] = 999;
DisablePlayerCheckpoint(playerid);
}
}
return 1;
}
new Float:gKosacCheckPoints[15][3] = {
{2033.7037,-1206.8521,21.8814},
{1919.9739,-1228.7462,17.8331},
{1901.3993,-1151.9857,23.9549},
{1947.4020,-1151.2452,21.3389},
{2036.5687,-1148.8398,23.6194},
{2009.4231,-1242.7227,22.2411},
{1955.5325,-1230.7494,19.3771},
{2005.0786,-1167.2902,20.4908},
{2038.0942,-1246.6910,23.0711},
{1928.0767,-1213.4518,19.4805},
{1866.7335,-1241.8611,14.0371},
{1951.8098,-1170.8796,19.9412},
{2030.3759,-1161.3545,21.8133},
{2020.5845,-1233.4797,21.5185},
{1995.5323,-1171.7660,20.0226}
};