Eigentlich sollte beim anhängen eines Tankanhängers eine meldung erscheinen zu welcher tanke des muss, aber die meldung erscheint einfach nicht weiss jemand warum???
public OnVehicleAttachTrailer()
{
for(new i=0;i<MAX_CARS;i++)
{
if(GetVehicleModel(i) == 591)
{
if(IsTrailerAttached(i))
{
if(TrailerAttached[i] == false)
{
TrailerAttached[i] = true;
if(trailerobject[i] > -1)
{
if(inhalt[i] <= 15 && inhalt[i] >= 0)
{
new playerid;
for(new j = 0;j<MAX_PLAYERS;j++)
{
if(IsPlayerConnected(j))
{
if(IsPlayerInAnyVehicle(j))
{
if(GetVehicleTrailer(GetPlayerVehicleID(j)) == i)
{
playerid = j;
j= MAX_PLAYERS;
}
}
}
}
//GangZoneCreate(-100,-100,100,100);
//CreateVehicle(411,checkpoints[inhalt[i]+3][1]
TankZone[playerid] = GangZoneCreate(floatround(checkpoints[inhalt[i]+3][0] - 100),floatround(checkpoints[inhalt[i]+3][1] - 100),floatround(checkpoints[inhalt[i]+3][0] + 100),floatround(checkpoints[inhalt[i]+3][1] + 100));
GangZoneShowForPlayer(playerid,TankZone[playerid],COLOR_RED);
SendClientMessage(playerid,COLOR_GREEN,"Schau auf die Karte um die Tankstelle zu sehen die du beliefern musst");
}
new tmp[256];
DestroyObject(trailerobject[i]);
trailerobject[i] = -1;
format(tmpstring,sizeof(tmpstring),"auto_config_datei_%d",i);
format(tmp,sizeof(tmp),"trailer%d",dUserINT(tmpstring).("pos"));
dUserSetINT("Trailer").(tmp,0);
new anzahl = dUserINT("Trailer").("anzahl");
dUserSetINT("Trailer").("anzahl",anzahl -1);
if(anzahl - 1 < 0)
{
dUserSetINT("Trailer").("anzahl",0);
}
udb_Remove(tmpstring);
}
}
} else {
TrailerAttached[i] = false;
}
}
}
}