Könntest noch versuchen es so zu machen:
UpdateStreamer(forplayerid, STREAMER_TYPE_3D_TEXT_LABEL);
Und eventuell in der Funktion bei der InRange abfrage, das von 50.0 auf 100.0 zu setzen
Könntest noch versuchen es so zu machen:
UpdateStreamer(forplayerid, STREAMER_TYPE_3D_TEXT_LABEL);
Und eventuell in der Funktion bei der InRange abfrage, das von 50.0 auf 100.0 zu setzen
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
new VehicleID = GetPlayerVehicleID(playerid);
new fV = IsAFraktionsVeh(vehicleid);
if(IsAFraktionsVeh(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(VehicleID) == 560 || fVehicle[fV][vehSiren] == 1 && fVehicle[fV][vehFraktion] == 5)
{
if(newstate)
{
FlashTime[vehicleid] = SetTimerEx("OnLightFlash", flashtime, true, "d", vehicleid);
fVehicle[fV][vehUCL] = CreateDynamicObject(19419,0,0,-1000,0,0,0,100);
AttachDynamicObjectToVehicle(fVehicle[fV][vehUCL], fVehicle[fV][vehID], 0.015000,0.000000,0.820000,0.000000,0.000000,0.000000);
GameTextForPlayer(playerid, "~w~Sirene ~g~an", 3000, 1);
}
if(!newstate)
{
new panels, tuer, licht, reifen;
KillTimer(FlashTime[vehicleid]);
GetVehicleDamageStatus(vehicleid, panels, tuer, licht, reifen);
UpdateVehicleDamageStatus(vehicleid, panels, tuer, 0, reifen);
DestroyDynamicObject(fVehicle[fV][vehUCL]);
GameTextForPlayer(playerid, "~w~Sirene ~r~aus", 3000, 1);
}
}
else if(GetVehicleModel(VehicleID) == 560 || fVehicle[fV][vehSiren] == 1 || fVehicle[fV][vehFraktion] == 2 || fVehicle[fV][vehFraktion] == 3 || fVehicle[fV][vehFraktion] == 4)
{
if(newstate)
{
FlashTime[vehicleid] = SetTimerEx("OnLightFlash", flashtime, true, "d", vehicleid);
SireneObject[VehicleID][0] = CreateDynamicObject(18646, 0, 0, -1000, 0, 0, 0, 100);
SireneObject[VehicleID][1] = CreateDynamicObject(19797, 0, 0, -1000, 0, 0, 0, 100);
SireneObject[VehicleID][2] = CreateDynamicObject(19797, 0, 0, -1000, 0, 0, 0, 100);
AttachDynamicObjectToVehicle(SireneObject[VehicleID][0], VehicleID, -0.544999,0.200000,0.859999,1.620000,-0.179999,0.000000);
AttachDynamicObjectToVehicle(SireneObject[VehicleID][1], VehicleID, 0.554999,-0.924999,0.665000,0.540000,-0.179999,0.000000);
AttachDynamicObjectToVehicle(SireneObject[VehicleID][2], VehicleID, -0.535000,-0.924999,0.665000,0.540000,-0.179999,0.000000);
GameTextForPlayer(playerid, "~w~Sirene ~g~an", 3000, 1);
}
if(!newstate)
{
new panels, tuer, licht, reifen;
KillTimer(FlashTime[vehicleid]);
GetVehicleDamageStatus(vehicleid, panels, tuer, licht, reifen);
UpdateVehicleDamageStatus(vehicleid, panels, tuer, 0, reifen);
DestroyDynamicObject(SireneObject[VehicleID][0]);
DestroyDynamicObject(SireneObject[VehicleID][1]);
DestroyDynamicObject(SireneObject[VehicleID][2]);
GameTextForPlayer(playerid, "~w~Sirene ~r~aus", 3000, 1);
}
}
}
return 1;
}
Alles anzeigen
Mal eine Kurze frage,
Warum kann ich die Sirene für LSPD nicht nutzen geschweige für SAMD?
vehSirene stimmt über ein das Fahrzeug und das es ein Fraktions Fahrzeug ist.
Na habe den fehler jetzt gefunden seid ich das gemacht habe:
stock CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:reset=false, siren)
{
new vehicleid;
if(vehicletype < 400 || vehicletype > 611)return 0;
vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, siren);
if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]);
DestroyObject(Vehicle[vehicleid][vehUCL]);
DestroyObject(SireneObject[vehicleid][0]);
DestroyObject(SireneObject[vehicleid][1]);
DestroyObject(SireneObject[vehicleid][2]);
Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehMotor] = false;
Vehicle[vehicleid][vehLicht] = false;
Vehicle[vehicleid][vehHaube] = false;
Vehicle[vehicleid][vehKRaum] = false;
Vehicle[vehicleid][vehPosX2] = x;
Vehicle[vehicleid][vehPosY2] = y;
Vehicle[vehicleid][vehPosZ2] = z;
Vehicle[vehicleid][vehSiren] = siren;
Vehicle[vehicleid][vehProds] = 0;
Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0;
Vehicle[vehicleid][vehGeladen][0] = 0;
Vehicle[vehicleid][vehGeladen][1] = 0;
Vehicle[vehicleid][vehGeladen][2] = 0;
Vehicle[vehicleid][vehGeladen][3] = 0;
Vehicle[vehicleid][vehGeladen][4] = 0;
Vehicle[vehicleid][vehGeladen][5] = 0;
Vehicle[vehicleid][vehMaterialien] = 0;
Vehicle[vehicleid][vehDrogen] = 0;
Vehicle[vehicleid][vehAKRounds] = 0;
Vehicle[vehicleid][vehM4Rounds] = 0;
Vehicle[vehicleid][vehSniperRounds] = 0;
Vehicle[vehicleid][vehDeagleRounds] = 0;
Vehicle[vehicleid][vehMP5Rounds] = 0;
Vehicle[vehicleid][vehShotgunRounds] = 0;
Vehicle[vehicleid][vehFahrgestell] = 0;
Vehicle[vehicleid][vehText] = CreateDynamic3DTextLabel(" ", COLOR_WHITE, 50.0, 60.0, 110.0, 20.0, INVALID_PLAYER_ID, vehicleid, 0, -1, -1, -1, 100.0);
Vehicle[vehicleid][vehAbgeschleppt] = 0;
strdel(Vehicle[vehicleid][vehAbgeschlepptVon], 0, MAX_PLAYER_NAME);
Vehicle[vehicleid][vehKaution] = 0;
if(reset == true)
{
Vehicle[vehicleid][vehTankKM] = 0;
Vehicle[vehicleid][vehKMStandCount] = 0;
Vehicle[vehicleid][vehKMStand] = 0;
Vehicle[vehicleid][vehFuel] = VehicleData[vehicletype-400][vehMaxTank];
Vehicle[vehicleid][vehNeonID] = 0;
Vehicle[vehicleid][vehProds] = 0;
Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0;
Vehicle[vehicleid][vehGeladen][0] = 0;
Vehicle[vehicleid][vehGeladen][1] = 0;
Vehicle[vehicleid][vehGeladen][2] = 0;
Vehicle[vehicleid][vehGeladen][3] = 0;
Vehicle[vehicleid][vehGeladen][4] = 0;
Vehicle[vehicleid][vehGeladen][5] = 0;
}
return vehicleid;
}
Alles anzeigen
Ersetzt zu da ich Züge drinn habe:
stock CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:train=false, siren)
{
new vehicleid;
if(vehicletype < 400 || vehicletype > 611)return 0;
if(!train) vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
else vehicleid = AddStaticVehicle(vehicletype, x, y, z, rotation, color1, color2);
if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]);
DestroyDynamicObject(Vehicle[vehicleid][vehUCL]);
DestroyDynamicObject(SireneObject[vehicleid][0]);
DestroyDynamicObject(SireneObject[vehicleid][1]);
DestroyDynamicObject(SireneObject[vehicleid][2]);
Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehMotor] = false;
Vehicle[vehicleid][vehLicht] = false;
Vehicle[vehicleid][vehHaube] = false;
Vehicle[vehicleid][vehKRaum] = false;
Vehicle[vehicleid][vehPosX2] = x;
Vehicle[vehicleid][vehPosY2] = y;
Vehicle[vehicleid][vehPosZ2] = z;
Vehicle[vehicleid][vehSiren] = siren;
Vehicle[vehicleid][vehProds] = 0;
Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0;
Vehicle[vehicleid][vehGeladen][0] = 0;
Vehicle[vehicleid][vehGeladen][1] = 0;
Vehicle[vehicleid][vehGeladen][2] = 0;
Vehicle[vehicleid][vehGeladen][3] = 0;
Vehicle[vehicleid][vehGeladen][4] = 0;
Vehicle[vehicleid][vehGeladen][5] = 0;
Vehicle[vehicleid][vehMaterialien] = 0;
Vehicle[vehicleid][vehDrogen] = 0;
Vehicle[vehicleid][vehAKRounds] = 0;
Vehicle[vehicleid][vehM4Rounds] = 0;
Vehicle[vehicleid][vehSniperRounds] = 0;
Vehicle[vehicleid][vehDeagleRounds] = 0;
Vehicle[vehicleid][vehMP5Rounds] = 0;
Vehicle[vehicleid][vehShotgunRounds] = 0;
Vehicle[vehicleid][vehFahrgestell] = 0;
Vehicle[vehicleid][vehText] = CreateDynamic3DTextLabel(" ", COLOR_WHITE, 50.0, 60.0, 110.0, 20.0, INVALID_PLAYER_ID, vehicleid, 0, -1, -1, -1, 100.0);
Vehicle[vehicleid][vehAbgeschleppt] = 0;
strdel(Vehicle[vehicleid][vehAbgeschlepptVon], 0, MAX_PLAYER_NAME);
Vehicle[vehicleid][vehKaution] = 0;
if(train == true)
{
Vehicle[vehicleid][vehTankKM] = 0;
Vehicle[vehicleid][vehKMStandCount] = 0;
Vehicle[vehicleid][vehKMStand] = 0;
Vehicle[vehicleid][vehFuel] = VehicleData[vehicletype-400][vehMaxTank];
Vehicle[vehicleid][vehNeonID] = 0;
Vehicle[vehicleid][vehProds] = 0;
Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0;
Vehicle[vehicleid][vehGeladen][0] = 0;
Vehicle[vehicleid][vehGeladen][1] = 0;
Vehicle[vehicleid][vehGeladen][2] = 0;
Vehicle[vehicleid][vehGeladen][3] = 0;
Vehicle[vehicleid][vehGeladen][4] = 0;
Vehicle[vehicleid][vehGeladen][5] = 0;
}
return vehicleid;
}
Alles anzeigen
Moin.
Und zwar habe ich vor, zu scripten, dass alle Häuser, die keinen Besitzer bei uns auf dem Server haben, als MapIcon darstellen zu lassen auf der Minimap. Soweit ich weiß, kann man "SetPlayerMapIcon" nur 100mal benutzen...Gibt es eine Alternative für SetPlayerMapIcon, womit man mehr als 100 darstellen lassen kann?
Gibt es eine Alternative für SetPlayerMapIcon, womit man mehr als 100 darstellen lassen kann?
Jap, mit einem Streamer
https://forum.sa-mp.com/showthread.php?t=102865
Funktion heißt: CreateDynamicMapIcon https://github.com/samp-incogn…eamer-plugin/wiki/Natives
Ist bei DestroyDynamicMapIcon(iconid); bei "iconid" die ID welches Mapicon das ist gemeint oder die Variable, die ich den MapIcon zuweise?
Damit ist die Variable gemeint
Ist bei DestroyDynamicMapIcon(iconid); bei "iconid" die ID welches Mapicon das ist gemeint oder die Variable, die ich den MapIcon zuweise?
In der Variable steckt die ID.
meineVariable = 1
Jetzt wäre der Inhalt von "meineVariable" die Zahl 1.
meineVariable = "Breadfish"
Jetzt wäre der Inhalt von "meineVariable" der String "Breadfish"
Hallo Jungs & Mädels,
und zwar habe ich ein Problem mit meinen Attach Objekten an Fahrzeugen.
Irgendwie werden mir die Attach sachen die ich an das Fahrzeug gemacht habe nur auf einer Seite angezeigt obwohl ich sie Richtig auf beiden Seiten Attached habe. Hoffe mir kann jemand weiterhelfen woran das liegt...
Hier wäre der Code:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////Fharzeuge von SWAT & Präsidenten by CoreX_Leey//////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <a_samp>
#include <streamer>
new carvid_0;
new carvid_1;
public OnFilterScriptInit()
{
new tmpobjid;
carvid_0 = CreateVehicle(409,1590.8591,-1690.1146,5.6907,1.0714,0,0,-1,0);
carvid_1 = CreateVehicle(428,1602.5768,-1667.8531,6.0112,89.5671,0,0,-1,0);
tmpobjid = CreateDynamicObject(19307,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 2896, "law_coffintxd", "metleg_32_law", 0);
SetDynamicObjectMaterial(tmpobjid, 1, 14802, "lee_bdupsflat", "USAflag", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_0, -0.710, 3.422, -0.090, 0.000, 0.000, 270.000);
tmpobjid = CreateDynamicObject(19307,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 2896, "law_coffintxd", "metleg_32_law", 0);
SetDynamicObjectMaterial(tmpobjid, 1, 19162, "newpolicehats", "policehatmap2", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_0, -0.710, 3.422, -0.090, 0.000, 0.000, -90.000);
tmpobjid = CreateDynamicObject(19348,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 2, -1, "none", "none", -16777216);
AttachDynamicObjectToVehicle(tmpobjid, carvid_0, -0.710, -3.420, -0.320, 10.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(19348,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 3, -1, "none", "none", -16777216);
AttachDynamicObjectToVehicle(tmpobjid, carvid_0, -0.710, -3.420, -0.320, 10.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(2731,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterialText(tmpobjid, 0, "S.W.A.T", 60, "Ariel", 40, 1, -1, -15195864, 1);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.570, 0.730, 0.000, 0.000, 90.000);
tmpobjid = CreateDynamicObject(2731,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterialText(tmpobjid, 0, "S.W.A.T", 60, "Ariel", 40, 1, -1, -15195864, 1);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.570, 0.730, 0.000, 0.000, 270.000);
tmpobjid = CreateDynamicObject(2731,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterialText(tmpobjid, 0, "San Andreas", 100, "Ariel", 40, 1, -8355712, 0, 1);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.580, 0.429, 0.000, 0.000, 90.000);
tmpobjid = CreateDynamicObject(2731,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterialText(tmpobjid, 0, "San Andreas", 100, "Ariel", 40, 1, -8355712, 0, 1);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.580, 0.429, 0.000, 0.000, -90.000);
tmpobjid = CreateDynamicObject(19620,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 0.790, 1.439, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(1185,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "CJ_CHROME2", 0);
SetDynamicObjectMaterial(tmpobjid, 1, 3922, "bistro", "vent_64", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.719, -0.370, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(19797,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.651, 0.040, 0.000, 0.000, 180.000);
tmpobjid = CreateDynamicObject(19797,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.651, 0.040, 0.000, 0.000, -180.000);
tmpobjid = CreateDynamicObject(11743,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gun_ceiling2_128", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.961, -0.840, 0.000, 0.000, 180.000);
tmpobjid = CreateDynamicObject(19830,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 19089, "matropes", "csrope02", 0);
SetDynamicObjectMaterial(tmpobjid, 2, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
SetDynamicObjectMaterial(tmpobjid, 3, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
SetDynamicObjectMaterial(tmpobjid, 4, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 3.000, -1.070, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(18634,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.770, -0.644, 0.000, -54.199, 0.000);
tmpobjid = CreateDynamicObject(18634,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 0.000, 0.000, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(2228,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 3881, "apsecurity_sfxrf", "ws_rooftarmac2", 0);
SetDynamicObjectMaterial(tmpobjid, 1, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.380, -0.719, 270.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(2228,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 3881, "apsecurity_sfxrf", "ws_rooftarmac2", 0);
SetDynamicObjectMaterial(tmpobjid, 1, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.380, -0.719, 270.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(19476,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterialText(tmpobjid, 0, "S.W.A.T", 40, "Ariel", 20, 1, -1, 0, 1);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.732, 0.230, 0.000, 0.000, 270.000);
tmpobjid = CreateDynamicObject(19844,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 15046, "svcunthoose", "GB_plug01", -9408400);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -1.351, 1.509, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(2731,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterialText(tmpobjid, 0, "S.W.A.T", 90, "Ariel", 40, 1, -16777216, 0, 1);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.980, -0.390, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(3350,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 14526, "sweetsmain", "Metal3_64_hole", 0);
SetDynamicObjectMaterial(tmpobjid, 1, 15046, "svcunthoose", "csheistbox01", 0);
SetDynamicObjectMaterial(tmpobjid, 3, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
SetDynamicObjectMaterial(tmpobjid, 4, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.210, -0.180, 0.000, 0.000, 180.000);
tmpobjid = CreateDynamicObject(19280,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.790, 1.609, 0.000, 0.000, 180.000);
tmpobjid = CreateDynamicObject(19280,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.790, 1.609, 0.000, 0.000, -180.000);
tmpobjid = CreateDynamicObject(2678,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "metpat64", -9408400);
SetDynamicObjectMaterial(tmpobjid, 1, 1560, "7_11_door", "CJ_CHROME2", -1);
SetDynamicObjectMaterial(tmpobjid, 2, 14584, "ab_abbatoir01", "ab_drainage", -14671840);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.040, -0.720, 270.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(2678,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "metpat64", -9408400);
SetDynamicObjectMaterial(tmpobjid, 1, 1560, "7_11_door", "CJ_CHROME2", -1);
SetDynamicObjectMaterial(tmpobjid, 2, 14584, "ab_abbatoir01", "ab_drainage", -14671840);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -0.040, -0.720, 270.000, 0.000, 180.000);
tmpobjid = CreateDynamicObject(2678,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "metpat64", -9408400);
SetDynamicObjectMaterial(tmpobjid, 1, 1560, "7_11_door", "CJ_CHROME2", -1);
SetDynamicObjectMaterial(tmpobjid, 2, 14584, "ab_abbatoir01", "ab_drainage", -14671840);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.490, -0.700, -90.000, 0.000, 270.000);
tmpobjid = CreateDynamicObject(1178,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 14612, "ab_abattoir_box", "pipes_csite_256", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.719, 1.430, 0.000, 90.000, 270.000);
tmpobjid = CreateDynamicObject(1178,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 14612, "ab_abattoir_box", "pipes_csite_256", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.719, -0.419, 0.000, -90.000, -270.000);
tmpobjid = CreateDynamicObject(1013,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 2.790, -0.460, 0.000, 0.000, 0.000);
tmpobjid = CreateDynamicObject(19797,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 1.261, 1.210, 0.000, 0.000, 180.000);
tmpobjid = CreateDynamicObject(19797,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 1.261, 1.210, 0.000, 0.000, -180.000);
tmpobjid = CreateDynamicObject(1178,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 14612, "ab_abattoir_box", "pipes_csite_256", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -1.438, 0.150, 90.000, 0.000, -270.000);
tmpobjid = CreateDynamicObject(1178,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 14612, "ab_abattoir_box", "pipes_csite_256", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, 0.283, 0.150, 90.000, 0.000, 270.000);
tmpobjid = CreateDynamicObject(18637,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.810, 0.510, 90.000, 0.000, 90.000);
tmpobjid = CreateDynamicObject(18637,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 5150, "wiresetc_las2", "ganggraf01_LA_m", 0);
AttachDynamicObjectToVehicle(tmpobjid, carvid_1, 1.191, -2.460, 0.510, 90.000, 0.000, -90.000);
}
public OnFilterScriptExit()
{
DestroyVehicle(carvid_0);
DestroyVehicle(carvid_1);
}
public OnVehicleSpawn(vehicleid)
{
if(vehicleid == carvid_0)
{
}
else if(vehicleid == carvid_1)
{
}
}
Alles anzeigen
AttachDynamicObjectToVehicle(tmpobjid, carvid_0, -0.710, 3.422, -0.090, 0.000, 0.000, 270.000);
...
AttachDynamicObjectToVehicle(tmpobjid, carvid_0, -0.710, 3.422, -0.090, 0.000, 0.000, -90.000);
Sicher dass es bei diesem Objekt ausreicht die Rotation zu ändern? Alles andere ist komplett gleich.
Alles anzeigenNa habe den fehler jetzt gefunden seid ich das gemacht habe:
CodeAlles anzeigenstock CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:reset=false, siren) { new vehicleid; if(vehicletype < 400 || vehicletype > 611)return 0; vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, siren); if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]); DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]); DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]); DestroyObject(Vehicle[vehicleid][vehUCL]); DestroyObject(SireneObject[vehicleid][0]); DestroyObject(SireneObject[vehicleid][1]); DestroyObject(SireneObject[vehicleid][2]); Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID; Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID; Vehicle[vehicleid][vehMotor] = false; Vehicle[vehicleid][vehLicht] = false; Vehicle[vehicleid][vehHaube] = false; Vehicle[vehicleid][vehKRaum] = false; Vehicle[vehicleid][vehPosX2] = x; Vehicle[vehicleid][vehPosY2] = y; Vehicle[vehicleid][vehPosZ2] = z; Vehicle[vehicleid][vehSiren] = siren; Vehicle[vehicleid][vehProds] = 0; Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0; Vehicle[vehicleid][vehGeladen][0] = 0; Vehicle[vehicleid][vehGeladen][1] = 0; Vehicle[vehicleid][vehGeladen][2] = 0; Vehicle[vehicleid][vehGeladen][3] = 0; Vehicle[vehicleid][vehGeladen][4] = 0; Vehicle[vehicleid][vehGeladen][5] = 0; Vehicle[vehicleid][vehMaterialien] = 0; Vehicle[vehicleid][vehDrogen] = 0; Vehicle[vehicleid][vehAKRounds] = 0; Vehicle[vehicleid][vehM4Rounds] = 0; Vehicle[vehicleid][vehSniperRounds] = 0; Vehicle[vehicleid][vehDeagleRounds] = 0; Vehicle[vehicleid][vehMP5Rounds] = 0; Vehicle[vehicleid][vehShotgunRounds] = 0; Vehicle[vehicleid][vehFahrgestell] = 0; Vehicle[vehicleid][vehText] = CreateDynamic3DTextLabel(" ", COLOR_WHITE, 50.0, 60.0, 110.0, 20.0, INVALID_PLAYER_ID, vehicleid, 0, -1, -1, -1, 100.0); Vehicle[vehicleid][vehAbgeschleppt] = 0; strdel(Vehicle[vehicleid][vehAbgeschlepptVon], 0, MAX_PLAYER_NAME); Vehicle[vehicleid][vehKaution] = 0; if(reset == true) { Vehicle[vehicleid][vehTankKM] = 0; Vehicle[vehicleid][vehKMStandCount] = 0; Vehicle[vehicleid][vehKMStand] = 0; Vehicle[vehicleid][vehFuel] = VehicleData[vehicletype-400][vehMaxTank]; Vehicle[vehicleid][vehNeonID] = 0; Vehicle[vehicleid][vehProds] = 0; Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0; Vehicle[vehicleid][vehGeladen][0] = 0; Vehicle[vehicleid][vehGeladen][1] = 0; Vehicle[vehicleid][vehGeladen][2] = 0; Vehicle[vehicleid][vehGeladen][3] = 0; Vehicle[vehicleid][vehGeladen][4] = 0; Vehicle[vehicleid][vehGeladen][5] = 0; } return vehicleid; }
Ersetzt zu da ich Züge drinn habe:
CodeAlles anzeigenstock CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:train=false, siren) { new vehicleid; if(vehicletype < 400 || vehicletype > 611)return 0; if(!train) vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay); else vehicleid = AddStaticVehicle(vehicletype, x, y, z, rotation, color1, color2); if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]); DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]); DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]); DestroyDynamicObject(Vehicle[vehicleid][vehUCL]); DestroyDynamicObject(SireneObject[vehicleid][0]); DestroyDynamicObject(SireneObject[vehicleid][1]); DestroyDynamicObject(SireneObject[vehicleid][2]); Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID; Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID; Vehicle[vehicleid][vehMotor] = false; Vehicle[vehicleid][vehLicht] = false; Vehicle[vehicleid][vehHaube] = false; Vehicle[vehicleid][vehKRaum] = false; Vehicle[vehicleid][vehPosX2] = x; Vehicle[vehicleid][vehPosY2] = y; Vehicle[vehicleid][vehPosZ2] = z; Vehicle[vehicleid][vehSiren] = siren; Vehicle[vehicleid][vehProds] = 0; Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0; Vehicle[vehicleid][vehGeladen][0] = 0; Vehicle[vehicleid][vehGeladen][1] = 0; Vehicle[vehicleid][vehGeladen][2] = 0; Vehicle[vehicleid][vehGeladen][3] = 0; Vehicle[vehicleid][vehGeladen][4] = 0; Vehicle[vehicleid][vehGeladen][5] = 0; Vehicle[vehicleid][vehMaterialien] = 0; Vehicle[vehicleid][vehDrogen] = 0; Vehicle[vehicleid][vehAKRounds] = 0; Vehicle[vehicleid][vehM4Rounds] = 0; Vehicle[vehicleid][vehSniperRounds] = 0; Vehicle[vehicleid][vehDeagleRounds] = 0; Vehicle[vehicleid][vehMP5Rounds] = 0; Vehicle[vehicleid][vehShotgunRounds] = 0; Vehicle[vehicleid][vehFahrgestell] = 0; Vehicle[vehicleid][vehText] = CreateDynamic3DTextLabel(" ", COLOR_WHITE, 50.0, 60.0, 110.0, 20.0, INVALID_PLAYER_ID, vehicleid, 0, -1, -1, -1, 100.0); Vehicle[vehicleid][vehAbgeschleppt] = 0; strdel(Vehicle[vehicleid][vehAbgeschlepptVon], 0, MAX_PLAYER_NAME); Vehicle[vehicleid][vehKaution] = 0; if(train == true) { Vehicle[vehicleid][vehTankKM] = 0; Vehicle[vehicleid][vehKMStandCount] = 0; Vehicle[vehicleid][vehKMStand] = 0; Vehicle[vehicleid][vehFuel] = VehicleData[vehicletype-400][vehMaxTank]; Vehicle[vehicleid][vehNeonID] = 0; Vehicle[vehicleid][vehProds] = 0; Vehicle[GetVehicleTrailer(vehicleid)][vehProds] = 0; Vehicle[vehicleid][vehGeladen][0] = 0; Vehicle[vehicleid][vehGeladen][1] = 0; Vehicle[vehicleid][vehGeladen][2] = 0; Vehicle[vehicleid][vehGeladen][3] = 0; Vehicle[vehicleid][vehGeladen][4] = 0; Vehicle[vehicleid][vehGeladen][5] = 0; } return vehicleid; }
Jemand eine Lösung? Beim ersten Code funktionierten die Sirenen noch. Beim Zweiten Code nicht mehr verstehe ich nicht so ganz..
BIn nicht mehr so in PAWN drin, aber zumindest erkenne ich, dass deine Parameter bei "CreateVehicle" sich unterscheiden.
Im ersten Code schreibst du:
Und im zweiten lässt du das "siren" weg:
Eine kleine frage, gibt es eine möglichkeit Objecte in einer Virtuellen Welt zu Spawnen ?
Wenn ja, würde mich freuen, wenn mir da eben fix jemand bei helfen kann wie man so etwas macht
Würde dir einfach raten einen Streamer zu nutzen, dort kannst du es einfach bei der erstellung angeben
Würde dir einfach raten einen Streamer zu nutzen, dort kannst du es einfach bei der erstellung angeben
Ich habe einen Streamer, Incongnito
Aber auf Wiki finde ich leider nichts dazu wie ich Objecte in eine Virtuelle Welt packe, deswegen habe ich hier auf Hilfe gehofft
Habe das hier Gefunden:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, Float:distance = 200.0);
Würde es so funktionieren ? Oder nicht ?
Habs selbst gefunden
So mache ich es einfach:
worldid = -1 // -1 durch deine virtualworld id ersetzen
Moin,
habe ein Problem mit einen SQL Befehl:
Befehl:
"UPDATE `server_user` SET `ztime`='0'"
Mit den Wer 'ztime' ist die Spielzeit des heutigen Tages gemeint, welche um 0 Uhr in der User Tabelle bei jeden Spieler auf 0 gesetzt werden soll. Hab versucht es mit den SQL Befehl: "UPDATE `server_user` SET `ztime`='0' WHERE ztime > 0"
Allerdings funktioniert es immer noch nicht richtig. Wie muss der SQL Befehl richtig lauten?