Guten Tag,
Ich will einen Checkpoint bei OnPlayerEnterChecckpoint abfragen und einen weitern setzten aber es geht nicht hir der code:
public OnPlayerEnterCheckpoint(playerid)
{
if(OamtCP[playerid]) {//der geht
for (new oamt = 0; oamt < sizeof(SAOAMTInfo); oamt ++) {
if(IsTrailerAttachedToVehicle(SAOAMTInfo[oamt][SAOAMTcarID])) {
for(new p = 0; p < MAX_PLAYERS; p++) {
if(GetVehicleTrailer(GetPlayerVehicleID(playerid)) == PlayerCarInfo[p][CarID]) {
new query[258];
DestroyVehicle(PlayerCarInfo[p][CarID]);
PlayerCarInfo[p][pOamt] = 1;
PlayerCarInfo[p][Pos][0] = 831.0031;
PlayerCarInfo[p][Pos][1] = -1212.8732;
PlayerCarInfo[p][Pos][2] = 16.5456;
PlayerCarInfo[p][Pos][3] = 181.9581;
format(query,sizeof(query),"UPDATE `userfahrzeuge` SET `Oamt` = '%i',`Car_X` = %f,`Car_Y` = %f,`Car_Z` = %f,`Car_A` = %f WHERE `Owner` = '%s'",1,831.0031,-1212.8732,16.5456,181.9581,PlayerName(p));
mysql_query(query);
SendClientMessage(playerid,COLOR_YELLOW,"* Du hast das Fahrzeug in Verwahrung geben.!");
DisablePlayerCheckpoint(playerid);
return 1;
}
}
}
}
}
else if(FreeCarCheck[playerid]) {//der geht nicht
DisablePlayerCheckpoint(playerid);
FreeCarCheck1[playerid] = SetPlayerCheckpoint(playerid,907.0074,-1220.7970,16.6810,8.0);//der hir wird nicht erstellt ;(
return 1;
}
else if(FreeCarCheck1[playerid]) {
MoveDynamicObject(OamtLS,923.45147705078, -1220.9178466797, 24.693405151367, 3.0);
SetTimer("OamtZu",3000,0);
return 1;
}
return 1;
}
{
if(OamtCP[playerid]) {//der geht
for (new oamt = 0; oamt < sizeof(SAOAMTInfo); oamt ++) {
if(IsTrailerAttachedToVehicle(SAOAMTInfo[oamt][SAOAMTcarID])) {
for(new p = 0; p < MAX_PLAYERS; p++) {
if(GetVehicleTrailer(GetPlayerVehicleID(playerid)) == PlayerCarInfo[p][CarID]) {
new query[258];
DestroyVehicle(PlayerCarInfo[p][CarID]);
PlayerCarInfo[p][pOamt] = 1;
PlayerCarInfo[p][Pos][0] = 831.0031;
PlayerCarInfo[p][Pos][1] = -1212.8732;
PlayerCarInfo[p][Pos][2] = 16.5456;
PlayerCarInfo[p][Pos][3] = 181.9581;
format(query,sizeof(query),"UPDATE `userfahrzeuge` SET `Oamt` = '%i',`Car_X` = %f,`Car_Y` = %f,`Car_Z` = %f,`Car_A` = %f WHERE `Owner` = '%s'",1,831.0031,-1212.8732,16.5456,181.9581,PlayerName(p));
mysql_query(query);
SendClientMessage(playerid,COLOR_YELLOW,"* Du hast das Fahrzeug in Verwahrung geben.!");
DisablePlayerCheckpoint(playerid);
return 1;
}
}
}
}
}
else if(FreeCarCheck[playerid]) {//der geht nicht
DisablePlayerCheckpoint(playerid);
FreeCarCheck1[playerid] = SetPlayerCheckpoint(playerid,907.0074,-1220.7970,16.6810,8.0);//der hir wird nicht erstellt ;(
return 1;
}
else if(FreeCarCheck1[playerid]) {
MoveDynamicObject(OamtLS,923.45147705078, -1220.9178466797, 24.693405151367, 3.0);
SetTimer("OamtZu",3000,0);
return 1;
}
return 1;
}