Hallo,
ich habe in meinem Script ein paar Nevadas am Flughafen.
Wenn ich in eins einsteige, spawnt ein zweites direkt da drüber.
Woran kann das liegen?
MFG
Nevadas erscheinen doppelt
- xRev92
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
Dein Code bei OnPlayerEnterVehicle?
-
Zeig dein OnPlayerEnterVehicle und den vier, wo das Flugzeug erstellt wird.
-
Das liegt sicherlich nicht an "OnPlayerEnterVehicle", er hat das Flugzeug einfach mehrmals auf der selben Position erstellt. Wenn man davor steht, sieht man nur eins und wenn man einsteigt, "flippt" ein Flugzeug raus.
-
Deswegen habe ich ja gesagt und warte auch darauf das er uns den uns den Clode zeigt, wie und wo er den Nevada spawned
-
Hier werden sie erstellt:
AddStaticVehicleEx(553,1806.6000000,-2414.8999000,15.8000000,178.0000000,140,146,15); //Nevada
AddStaticVehicleEx(553,1838.1000000,-2415.1001000,15.8000000,178.0000000,140,146,15); //Nevada
AddStaticVehicleEx(553,1725.0000000,-2413.0000000,15.8000000,178.0000000,140,146,15); //Nevada
AddStaticVehicleEx(553,1645.8000000,-2414.6001000,15.8000000,178.0000000,140,146,15); //Nevada
AddStaticVehicleEx(553,1565.6000000,-2413.3000000,15.8000000,180.0000000,140,146,15); //Nevada
AddStaticVehicleEx(553,1482.8000000,-2409.6001000,21.2000000,180.0000000,140,146,15); //NevadaHier OnPlayerEnterVehicle:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 510)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
else
{
SendClientMessage(playerid,TUERKIS,"Der Motor wird mit /m gestartet. Die Lichter startest du mit /l.");
}
return 1;
} -
Zeig uns mal dein Callback OnPlayerStateChange.
-
[size=10]public OnPlayerStateChange(playerid, newstate, oldstate)[/size]
{
if(newstate == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
TextDrawShowForPlayer(playerid,Textdraw4[playerid]);
TextDrawShowForPlayer(playerid,Textdraw5[playerid]);
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
TextDrawShowForPlayer(playerid,Textdraw7[playerid]);
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
TextDrawShowForPlayer(playerid,Textdraw9[playerid]);
TextDrawShowForPlayer(playerid,Textdraw10[playerid]);
TextDrawShowForPlayer(playerid,Textdraw11[playerid]);
TextDrawShowForPlayer(playerid,Textdraw12[playerid]);
TextDrawShowForPlayer(playerid,Textdraw13[playerid]);
TextDrawShowForPlayer(playerid,Textdraw14[playerid]);
}
if(oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
TextDrawHideForPlayer(playerid,Textdraw5[playerid]);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7[playerid]);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9[playerid]);
TextDrawHideForPlayer(playerid,Textdraw10[playerid]);
TextDrawHideForPlayer(playerid,Textdraw11[playerid]);
TextDrawHideForPlayer(playerid,Textdraw12[playerid]);
TextDrawHideForPlayer(playerid,Textdraw13[playerid]);
TextDrawHideForPlayer(playerid,Textdraw14[playerid]);
}
return 1;
}[size=10]public OnPlayerStateChange(playerid, newstate, oldstate)[/size]
{
if(newstate == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
TextDrawShowForPlayer(playerid,Textdraw4[playerid]);
TextDrawShowForPlayer(playerid,Textdraw5[playerid]);
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
TextDrawShowForPlayer(playerid,Textdraw7[playerid]);
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
TextDrawShowForPlayer(playerid,Textdraw9[playerid]);
TextDrawShowForPlayer(playerid,Textdraw10[playerid]);
TextDrawShowForPlayer(playerid,Textdraw11[playerid]);
TextDrawShowForPlayer(playerid,Textdraw12[playerid]);
TextDrawShowForPlayer(playerid,Textdraw13[playerid]);
TextDrawShowForPlayer(playerid,Textdraw14[playerid]);
}
if(oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
TextDrawHideForPlayer(playerid,Textdraw5[playerid]);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7[playerid]);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9[playerid]);
TextDrawHideForPlayer(playerid,Textdraw10[playerid]);
TextDrawHideForPlayer(playerid,Textdraw11[playerid]);
TextDrawHideForPlayer(playerid,Textdraw12[playerid]);
TextDrawHideForPlayer(playerid,Textdraw13[playerid]);
TextDrawHideForPlayer(playerid,Textdraw14[playerid]);
}
return 1;
}[size=10]public OnPlayerStateChange(playerid, newstate, oldstate)[/size]
{
if(newstate == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
TextDrawShowForPlayer(playerid,Textdraw4[playerid]);
TextDrawShowForPlayer(playerid,Textdraw5[playerid]);
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
TextDrawShowForPlayer(playerid,Textdraw7[playerid]);
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
TextDrawShowForPlayer(playerid,Textdraw9[playerid]);
TextDrawShowForPlayer(playerid,Textdraw10[playerid]);
TextDrawShowForPlayer(playerid,Textdraw11[playerid]);
TextDrawShowForPlayer(playerid,Textdraw12[playerid]);
TextDrawShowForPlayer(playerid,Textdraw13[playerid]);
TextDrawShowForPlayer(playerid,Textdraw14[playerid]);
}
if(oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
TextDrawHideForPlayer(playerid,Textdraw5[playerid]);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7[playerid]);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9[playerid]);
TextDrawHideForPlayer(playerid,Textdraw10[playerid]);
TextDrawHideForPlayer(playerid,Textdraw11[playerid]);
TextDrawHideForPlayer(playerid,Textdraw12[playerid]);
TextDrawHideForPlayer(playerid,Textdraw13[playerid]);
TextDrawHideForPlayer(playerid,Textdraw14[playerid]);
}
return 1;
}Keiner eine Idee?
-
breadfish.de
Hat das Thema geschlossen.