Beiträge von CptSky_
-
-
@ FileZilla:
Es wird eine bestimme Neonrohre gespeichert, z.B. vehNeonID == 3 .
-
Guten abend Com,
Und zwar wie mach ich das wenn ich de Befehl eingebe das Neon ein und ausgeschaltet wird ?
Habe schon bisschen gemacht aber komme nicht weiter das Neon wird ausgeschaltet aber nicht mehr ein.Code:
Spoiler anzeigen if(strcmp(cmd,"UBB",true) == 0)
{
if(Spieler[playerid][pPremium] < 0)return SendClientMessage(playerid, COLOR_GREY, "* Du besitzt kein Premium.");
if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, COLOR_GREY, "** Du befindest dich in keinem Fahrzeug.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLOR_GREY, "Du bist nicht auf der Fahrerseite.");
for(new slot=0;slot<MAX_PLAYER_VEHICLES;slot++)
{
if(Spieler[playerid][pUBBStatus] == 1)
{
switch(PrivateVehicle[playerid][slot][vehNeonID])
{
case 1: // Blau
{
PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 2: // Grün
{
PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3: // Weiß
{
PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 4: // Pink
{
PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 5: // Gelb
{
PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6: // Rot
{
PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
}
Spieler[playerid][pUBBStatus] = 0;
SendClientMessage(playerid,COLOR_WHITE,"Du hast Unterbodenbeleuchtung {33AA33}eingeschaltet{FFFFFF}");
}
else if(Spieler[playerid][pUBBStatus] == 0)
{Spoiler anzeigen VehicleTuningNeon(playerid, slot);
Spieler[playerid][pUBBStatus] = 1;
SendClientMessage(playerid,COLOR_WHITE,"Du hast Unterbodenbeleuchtung {AA3333}ausgeschaltet{FFFFFF}");
}
return 1;
}
}Vielleicht kann der liebe Jeffry: mir nochmal helfen.
-
public OnVehicleDeath(vehicleid, killerid)
{
if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]);
Vehicle[vehicleid][vehMotor] = false; Vehicle[vehicleid][vehLicht] = false;
Vehicle[vehicleid][vehHaube] = false; Vehicle[vehicleid][vehKRaum] = false;
DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]);
Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID;
return 1;
}case DIALOG_CARSELL2:
{
if(response)
{
if(GetPlayerVehicleCount(playerid))
{
new query[128];
new preis = PrivateVehicle[playerid][currentslot[playerid]][vehPreis]/2;
if(!strcmp(GetName(playerid), PrivateVehicle[playerid][currentslot[playerid]][vehBesitzer], true))
{
if(PrivateVehicle[playerid][currentslot[playerid]][modelid] != 0 && IsValidVehicle(PrivateVehicle[playerid][currentslot[playerid]][vehID]))
{
format(query, sizeof(query), COLOR_HEX_LIGHTBLUE"Du hast dein Fahrzeug ("COLOR_HEX_WHITE"%s"COLOR_HEX_LIGHTBLUE") erfolgreich für "COLOR_HEX_WHITE"$%d"COLOR_HEX_LIGHTBLUE" verkauft.", VehicleName[PrivateVehicle[playerid][currentslot[playerid]][modelid]-400],PrivateVehicle[playerid][currentslot[playerid]][vehPreis]);
SendClientMessage(playerid, COLOR_WHITE, query);
PrivateVehicle[playerid][currentslot[playerid]][modelid] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehPosX] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehPosY] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehPosZ] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehPosA] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehColor1] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehColor2] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehPaintjob] = -1;
PrivateVehicle[playerid][currentslot[playerid]][vehSpoiler] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehHood] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehRoof] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehSideskirt] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehLamps] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehNitro] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehExhaust] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehWheels] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehStereo] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehHydraulics] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehFrontBumper] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehRearBumper] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehVentRight] = 0;
PrivateVehicle[playerid][currentslot[playerid]][vehVentLeft] = 0;
GiveMoney(playerid, preis);
PrivateVehicle[playerid][currentslot[playerid]][vehPreis] = 0;
DestroyDynamicObject(PrivateVehicle[playerid][currentslot[playerid]][vehNeon1]);
DestroyDynamicObject(PrivateVehicle[playerid][currentslot[playerid]][vehNeon2]);
PrivateVehicle[playerid][currentslot[playerid]][vehNeon1] = INVALID_OBJECT_ID;
PrivateVehicle[playerid][currentslot[playerid]][vehNeon2] = INVALID_OBJECT_ID;
PrivateVehicle[playerid][currentslot[playerid]][vehNeonID] = 0;
format(PrivateVehicle[playerid][currentslot[playerid]][vehBesitzer], 25,"-");
DeleteVehicle(PrivateVehicle[playerid][currentslot[playerid]][vehID]);
PrivateVehicle[playerid][currentslot[playerid]][vehID] = -1;
mysql_format(myCon, query, sizeof(query), "DELETE FROM `script_vehicles` WHERE `vehBesitzer` = '%s' AND `Slot` = '%d'", GetName(playerid), currentslot[playerid]);
mysql_tquery(myCon, query, "", "");
}
}
}
}
}stock DeleteVehicle(vehicleid)
{
if(IsValidVehicle(vehicleid))
{
Vehicle[vehicleid][vehNeonID] = 0;
DestroyDynamic3DTextLabel(Vehicle[vehicleid][vehText]);
DestroyDynamic3DTextLabel(Vehicle[vehicleid][TaxiText]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]);
Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehKMStand] = 0;
Vehicle[vehicleid][vehTankKM] = 0;
Vehicle[vehicleid][vehKMStandCount] = 0;
if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]);
Vehicle[vehicleid][vehMotor] = false;
Vehicle[vehicleid][vehLicht] = false;
Vehicle[vehicleid][vehHaube] = false;
Vehicle[vehicleid][vehKRaum] = false;
Vehicle[vehicleid][vehFuel] = VehicleData[GetVehicleModel(vehicleid)-400][vehMaxTank];
Vehicle[vehicleid][vehPosX2] = -1;
Vehicle[vehicleid][vehPosY2] = -1;
Vehicle[vehicleid][vehPosZ2] = -1;
DestroyVehicle(vehicleid);
return 1;
}
return 0;
} -
-
Also wenn ein Spieler auf dem Server kommt, kriegt er immer nur die ID womit er sich registiert hat, aber ich speicher keine ID ab vom Spieler.
Wenn er sein Führerschein machen will Spawnt das Fahrzeug mit Neon.
Er holt sich ein BMX spawnt es auch mit Neon.mal der BMX Code:
Spoiler anzeigen CMD:fahrrad(playerid)
{
if(!IsLoggedIn(playerid))return 1;
if(Spieler[playerid][pLevel] >= 3)return SendClientMessage(playerid, COLOR_GREY, "** Fahrräder können nur unter Level 3 gemietet werden!");
if(Spieler[playerid][pBike] != INVALID_VEHICLE_ID)return SendClientMessage(playerid, COLOR_GREY, "** Du hast bereits ein Fahrrad gemietet. Tippe "COLOR_HEX_BLUE"/unrentfahrrad"COLOR_HEX_GREY" um es abzugeben.");
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1772.1301,-1888.6050,13.5608))return SendClientMessage(playerid, COLOR_GREY, "** Du befindest dich nicht in der Nähe vom Fahrrad-Verleih!");
if(Spieler[playerid][pTutorial] == 3)
{
Spieler[playerid][pBike] = CreateVehicleEx(481,1776.0751,-1885.7290,12.9027,268.8185,0,0,-1,true);
PutPlayerInVehicleEx(playerid, Spieler[playerid][pBike], 0);
ShowInfo(playerid, "~b~"SERVER_NAME" - Tutorial", "Das Fahrrad kannst du jederzeit mit ~b~/lock~n~~w~oeffnen und schliessen, sodass dir ~n~dieses niemand stehlen kann!~n~~n~Bitte fahre nun zur Stadthalle.~n~Diese wurde dir bereits ~r~rot~w~ auf der Karte markiert.");
SetPlayerCheckpointEx(playerid, 1479.8075,-1742.3326,13.5469, 2.0, CP_TUTORIAL_2, CP_TYPE_TUTORIAL);
LockVehicle(Spieler[playerid][pBike]);
GameTextForPlayer(playerid, "~w~Fahrrad~n~~r~abgeschlossen", 3000, 6);
SavePlayer(playerid);
}
else
{
if(GetMoney(playerid) < 200)return SendClientMessage(playerid, COLOR_GREY, ERROR_MONEY);
Spieler[playerid][pBike] = CreateVehicleEx(481,1776.0751,-1885.7290,12.9027,268.8185,0,0,-1,true);
PutPlayerInVehicleEx(playerid, Spieler[playerid][pBike], 0);
LockVehicle(Spieler[playerid][pBike]);
GameTextForPlayer(playerid, "~w~Fahrrad~n~~r~abgeschlossen", 3000, 6);
}
return 1;
} -
Habe ein Fehler nun,
Wenn ein anderer SPieler online kommt und ein Fahrzeug kauft kriegt er UBB, wenn er sich ein BMX kauft kriegt er UBB. -
Code:
Spoiler anzeigen stock CreatePlayerVehicle(playerid, vehmodel, Float:posx, Float:posy, Float:posz, Float:posa, numberplate[], preis, neon, color1, color2)
{
new mainQuery[1537], secondQuery[256];
for(new slot=0;slot<MAX_PLAYER_VEHICLES;slot++)
{
if(PrivateVehicle[playerid][slot][modelid] == 0)
{
format(PrivateVehicle[playerid][slot][vehBesitzer], 24, "%s", GetName(playerid));
PrivateVehicle[playerid][slot][modelid] = vehmodel;
PrivateVehicle[playerid][slot][vehPosX] = posx;
PrivateVehicle[playerid][slot][vehPosY] = posy;
PrivateVehicle[playerid][slot][vehPosZ] = posz;
PrivateVehicle[playerid][slot][vehPosA] = posa;
PrivateVehicle[playerid][slot][vehInterior] = GetPlayerInterior(playerid);
PrivateVehicle[playerid][slot][vehWorld] = GetPlayerVirtualWorld(playerid);
PrivateVehicle[playerid][slot][vehColor1] = color1;
PrivateVehicle[playerid][slot][vehColor2] = color2;
PrivateVehicle[playerid][slot][vehPaintjob] = -1;
PrivateVehicle[playerid][slot][vehSpoiler] = 0;
PrivateVehicle[playerid][slot][vehHood] = 0;
PrivateVehicle[playerid][slot][vehRoof] = 0;
PrivateVehicle[playerid][slot][vehSideskirt] = 0;
PrivateVehicle[playerid][slot][vehLamps] = 0;
PrivateVehicle[playerid][slot][vehNitro] = 0;
PrivateVehicle[playerid][slot][vehExhaust] = 0;
PrivateVehicle[playerid][slot][vehWheels] = 0;
PrivateVehicle[playerid][slot][vehStereo] = 0;
PrivateVehicle[playerid][slot][vehHydraulics] = 0;
PrivateVehicle[playerid][slot][vehFrontBumper] = 0;
PrivateVehicle[playerid][slot][vehRearBumper] = 0;
PrivateVehicle[playerid][slot][vehVentRight] = 0;
PrivateVehicle[playerid][slot][vehVentLeft] = 0;
PrivateVehicle[playerid][slot][vehPreis] = preis;
PrivateVehicle[playerid][slot][vehHealth] = 1000.0;
PrivateVehicle[playerid][slot][vehNeonID] = neon;
PrivateVehicle[playerid][slot][vehTankKM] = 0;
PrivateVehicle[playerid][slot][vehKMStandCount] = 0;
PrivateVehicle[playerid][slot][vehKMStand] = 0;
format(PrivateVehicle[playerid][slot][vehNumberPlate], 16, numberplate);
PrivateVehicle[playerid][slot][vehID] = CreateVehicleEx(PrivateVehicle[playerid][slot][modelid], PrivateVehicle[playerid][slot][vehPosX], PrivateVehicle[playerid][slot][vehPosY], PrivateVehicle[playerid][slot][vehPosZ], PrivateVehicle[playerid][slot][vehPosA], PrivateVehicle[playerid][slot][vehColor1], PrivateVehicle[playerid][slot][vehColor2], -1, false);
new playerName[MAX_PLAYER_NAME+1], nPlate[32], cutName[24+1];
GetPlayerName(playerid, playerName, sizeof(playerName));
strmid(cutName, playerName, 0, 1, sizeof(cutName));
format(nPlate, sizeof(nPlate), "%s",GetName(playerid));
SetVehicleNumberPlate(PrivateVehicle[playerid][slot][vehID], nPlate);
SetVehicleHealth(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehHealth]);
strdel(mainQuery, 0, sizeof(mainQuery));
strcat(mainQuery, "INSERT INTO `script_vehicles` (`vehBesitzer`, `slot`, `modelid`, `vehPosX`, `vehPosY`, `vehPosZ`, `vehPosA`, `vehHealth`, `vehColor1`, `vehColor2`, ");
strcat(mainQuery, "`vehPaintjob`, `vehSpoiler`, `vehHood`, `vehRoof`, `vehSideskirt`, `vehLamps`, `vehNitro`, `vehExhaust`, `vehWheels`, `vehStereo`, `vehHydraulics`, ");
strcat(mainQuery, "`vehFrontBumper`, `vehRearBumper`, `vehVentRight`, `vehVentLeft`, `vehPreis`, `vehNeonID`, `vehNumberPlate`, `vehFuel`, `vehKMStand`, `vehInterior`, ");
strcat(mainQuery, "`vehWorld`) VALUES (");
format(secondQuery, sizeof(secondQuery), "'%s', '%d', '%d', '%f', '%f', '%f', '%f', '%f', '%d', '%d', ",
PrivateVehicle[playerid][slot][vehBesitzer], slot, PrivateVehicle[playerid][slot][modelid], PrivateVehicle[playerid][slot][vehPosX],
PrivateVehicle[playerid][slot][vehPosY], PrivateVehicle[playerid][slot][vehPosZ], PrivateVehicle[playerid][slot][vehPosA],
PrivateVehicle[playerid][slot][vehHealth], PrivateVehicle[playerid][slot][vehColor1], PrivateVehicle[playerid][slot][vehColor2]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "'%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', ",
PrivateVehicle[playerid][slot][vehPaintjob], PrivateVehicle[playerid][slot][vehSpoiler], PrivateVehicle[playerid][slot][vehHood],
PrivateVehicle[playerid][slot][vehRoof], PrivateVehicle[playerid][slot][vehSideskirt], PrivateVehicle[playerid][slot][vehLamps],
PrivateVehicle[playerid][slot][vehNitro], PrivateVehicle[playerid][slot][vehExhaust], PrivateVehicle[playerid][slot][vehWheels],
PrivateVehicle[playerid][slot][vehStereo], PrivateVehicle[playerid][slot][vehHydraulics]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "'%d', '%d', '%d', '%d', '%d', '%d', '%s', '%f', '%f', '%d', '%d')",
PrivateVehicle[playerid][slot][vehFrontBumper], PrivateVehicle[playerid][slot][vehRearBumper], PrivateVehicle[playerid][slot][vehVentRight],
PrivateVehicle[playerid][slot][vehVentLeft], PrivateVehicle[playerid][slot][vehPreis], PrivateVehicle[playerid][slot][vehNeonID],
PrivateVehicle[playerid][slot][vehNumberPlate], PrivateVehicle[playerid][slot][vehFuel], PrivateVehicle[playerid][slot][vehKMStand],
PrivateVehicle[playerid][slot][vehInterior], PrivateVehicle[playerid][slot][vehWorld]);
strcat(mainQuery, secondQuery);
mysql_function_query(myCon, mainQuery, false, "", "");
SetVehicleToRespawn(PrivateVehicle[playerid][slot][vehID]);
Vehicle[PrivateVehicle[playerid][slot][vehID]][vehFuel] = VehicleData[vehmodel-400][vehMaxTank];
return 1;
}
}
return 1;
}//e
Vielleicht weiss ein anderer was.
Da ich nicht weiss wann Jeffry: online kommst.via Handy geschrieben
-
Wo ich das Fahrzeug auswählen kann.
Spoiler anzeigen case DIALOG_GUTSCHEIN_INFORMATIONEN:
{
if(response)
{
for(new i=0; i<sizeof(Gutschein); i++)
{
new string[128];new query[150];
if(Gutschein[i][ID] == 0)continue;
if(GetPVarInt(playerid, "Code") != Gutschein[i][Gutscheincode])continue;
switch(Gutschein[i][Gutscheintyp])
{
case 1: { Spieler[playerid][pPremium] = 1; Spieler[playerid][pPremiumTage] = gettime()+(86400*7); }
case 2: { Spieler[playerid][pPremium] = 1; Spieler[playerid][pPremiumTage] = gettime()+(86400*14); }
case 3: { Spieler[playerid][pPremium] = 2; Spieler[playerid][pPremiumTage] = gettime()+(86400*3640); }
case 4: { Spieler[playerid][pExp] += 4; }
case 5: { Spieler[playerid][pExp] += 8; }
case 6: { Spieler[playerid][pExp] += 12; }
case 7: { GiveMoney(playerid, 7500); }
case 8: { GiveMoney(playerid, 15000); }
case 9: { GiveMoney(playerid, 25000); }
}
Gutschein[i][Vorhanden] = 1;
format(query, sizeof(query), "UPDATE `script_gutscheine` SET `Vorhanden` = '1', `EingeloestName` = '%s' WHERE `Gutscheincode` = '%d'",GetName(playerid), Gutschein[i][Gutscheincode]);
mysql_function_query(myCon, query, false, "", "");
if(Gutschein[i][Gutscheintyp] == 10){return ShowPlayerDialog(playerid, DIALOG_GUTSCHEIN_UBB, DIALOG_STYLE_LIST, "Fahrzeug", "Sultan\nJester\nInfernus\nTurismo\nBullet\nZR-350\nBanshee\nCheetah\nSuper GT", "Auswählen", "");}
format(string,sizeof(string),"{FFFFFF}Du hast erfolgreich deinen Gutscheincode {40A5FE}%s{FFFFFF} eingelöst.\n",GetPremiumStatus(Gutschein[i][Gutscheintyp]));
ShowPlayerDialog(playerid, DIALOG_GUTSCHEIN_EINGELOEST, DIALOG_STYLE_MSGBOX, "Gutschein eingelöst",string, "Schließen", "");
return 1;
}
return 1;
}
if(!response)
{
return 1;
}
}Fahrzeug wird erstell und danach wird das Neon Dialog geöffnet
Spoiler anzeigen case DIALOG_GUTSCHEIN_UBB:
{
if(response)
{
new type = listitem+1;
switch(type)
{
case 1: { CreatePlayerVehicle(playerid, 560, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 2: { CreatePlayerVehicle(playerid, 559, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 3: { CreatePlayerVehicle(playerid, 411, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 4: { CreatePlayerVehicle(playerid, 451, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 5: { CreatePlayerVehicle(playerid, 541, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 6: { CreatePlayerVehicle(playerid, 477, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 7: { CreatePlayerVehicle(playerid, 429, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 8: { CreatePlayerVehicle(playerid, 415, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
case 9: { CreatePlayerVehicle(playerid, 506, -1706.9330,11.5702,3.2606,316.5364,GetName(playerid),0,0,0,0); }
}
SetVehicleParamsEx(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
ShowPlayerDialog(playerid, DIALOG_GUTSCHEIN_UBB2, DIALOG_STYLE_LIST, "Unterbodenbeleichtung", "Blau\nGrün\nWeiss\nPink\nGelb\nRot", "Auswählen", "");
return 1;
}
}Wo das Neon am Fahrzeug dran gemacht wird. ( Aber da überschneidet sich das alles)
Spoiler anzeigen case DIALOG_GUTSCHEIN_UBB2:
{
if(response)
{
for(new vehSlot=0;vehSlot<MAX_PLAYER_VEHICLES;vehSlot++)
{
new type = listitem+1;
switch(type)
{
case 1: // Blau
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 2: // Grün
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3: // Weiß
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 4: // Pink
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 5: // Gelb
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6: // Rot
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
}
new query[256];
PrivateVehicle[playerid][vehSlot][vehNeonID] = type;
format(query, sizeof(query), "UPDATE `script_vehicles` SET `vehNeonID` = '%d' WHERE `vehBesitzer` = '%s' AND `Slot` = '%d'",type,PrivateVehicle[playerid][vehSlot][vehBesitzer],vehSlot);
mysql_function_query(myCon, query, false, "", "");
SendClientMessage(playerid, COLOR_WHITE, "* Dein Gutschein wurde erfolgreich eingelöst.");
SendClientMessage(playerid, COLOR_WHITE, "* Das Fahrzeug wurde geliefert, Du findest es auf der Map.");
SetPlayerCheckpointEx(playerid, -1706.9330,11.5702,3.2606, 5.0, CP_UBBCAR, INVALID_CHECKPOINT_TYPE);
return 1;
}
}
} -
@Jeffty:
Das wird alles über ein Gutschein erstellt.
ich habe gerade selber kein plan was Du brauchstAlso wenn ich den Gutschein eingebe kommt ein Dialog wo ich mein Fahrzeug aussuche und wird auch erstellt.
Danach kommt ein weiteres Dialog wo ich das Neon aussuchen kann und da überschneidet sich das. -
Mit vehSlot wird die Datenbank ausgelesen.
Zeige dir mal meinen CarKey.
Befehl:
Spoiler anzeigen CMD:carkey(playerid)
{
if(!IsLoggedIn(playerid))return 1;
if(Spieler[playerid][pTutorial] > 0)return SendClientMessage(playerid, COLOR_GREY, "Du bist derzeit im Tutorial, und kannst keine Befehle benutzen.");
new string1[64], string2[64], string3[64], string4[64];
if(GetPlayerVehicleCount(playerid) == 0)return SendClientMessage(playerid, COLOR_GREY, "** Du besitzt keine Autoschlüssel.");
if(PrivateVehicle[playerid][0][modelid] >= 400 && PrivateVehicle[playerid][0][modelid] <= 611) // Erster Slot
{
format(string1, sizeof(string1), "{FFFFFF}%s\n", VehicleName[PrivateVehicle[playerid][0][modelid]-400]);
}
else
{
format(string1, sizeof(string1), "{FFFFFF}-\n");
}
if(PrivateVehicle[playerid][1][modelid] >= 400 && PrivateVehicle[playerid][1][modelid] <= 611) // Zweiter Slot
{
format(string2, sizeof(string2), "{FFFFFF}%s\n", VehicleName[PrivateVehicle[playerid][1][modelid]-400]);
}
else
{
format(string2, sizeof(string2), "{FFFFFF}-\n");
}
if(PrivateVehicle[playerid][2][modelid] >= 400 && PrivateVehicle[playerid][2][modelid] <= 611) // Dritter Slot
{
format(string3, sizeof(string3), "{FFFFFF}%s\n", VehicleName[PrivateVehicle[playerid][2][modelid]-400]);
}
else
{
format(string3, sizeof(string3), "{FFFFFF}-\n");
}
if(PrivateVehicle[playerid][3][modelid] >= 400 && PrivateVehicle[playerid][3][modelid] <= 611) // Vierter Slot
{
format(string4, sizeof(string4), "{FFFFFF}%s\n", VehicleName[PrivateVehicle[playerid][3][modelid]-400]);
}
else
{
format(string4, sizeof(string4), "{FFFFFF}-\n");
}
strdel(DialogString, 0, sizeof(DialogString));
format(DialogString, sizeof(DialogString), "%s%s%s%s", string1, string2, string3, string4);
ShowPlayerDialog(playerid, DIALOG_CARKEYS, DIALOG_STYLE_LIST, "Deine Autoschlüssel", DialogString, "Orten", "Schließen");
return 1;
}Dialog:
Spoiler anzeigen case DIALOG_CARKEYS:
{
if(response)
{
new id = listitem, Float:pos[3], string[128];
if(PrivateVehicle[playerid][id][modelid] >= 400 && PrivateVehicle[playerid][id][modelid] <= 611)
{
GetVehiclePos(PrivateVehicle[playerid][id][vehID], pos[0], pos[1], pos[2]);
SetPlayerCheckpointEx(playerid, pos[0], pos[1], pos[2], 5.0, CP_FINDCAR, INVALID_CHECKPOINT_TYPE);
format(string, sizeof(string), COLOR_HEX_LIGHTBLUE"* Dein Fahrzeug ("COLOR_HEX_WHITE"%s"COLOR_HEX_LIGHTBLUE") wurde auf der Karte rot markiert.", VehicleName[PrivateVehicle[playerid][id][modelid]-400]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "** Du besitzt auf diesem Schlüssel kein Fahrzeug.");
return 1;
}
}
} -
Funktioniert leider immernoch nicht
case DIALOG_GUTSCHEIN_UBB2:
{
if(response)
{
for(new vehSlot=0;vehSlot<MAX_PLAYER_VEHICLES;vehSlot++)
{
new type = listitem+1;
if(PrivateVehicle[playerid][vehSlot] != 0)continue;
switch(type)
{
case 1: // Blau
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 2: // Grün
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3: // Weiß
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 4: // Pink
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 5: // Gelb
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6: // Rot
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
}
new query[256];
PrivateVehicle[playerid][vehSlot][vehNeonID] = type;
format(query, sizeof(query), "UPDATE `script_vehicles` SET `vehNeonID` = '%d' WHERE `vehBesitzer` = '%s' AND `Slot` = '%d'",type,PrivateVehicle[playerid][vehSlot][vehBesitzer],vehSlot+1);
mysql_function_query(myCon, query, false, "", "");
SendClientMessage(playerid, COLOR_WHITE, "* Dein Gutschein wurde erfolgreich eingelöst.");
SendClientMessage(playerid, COLOR_WHITE, "* Das Fahrzeug wurde geliefert, Du findest es auf der Map.");
SetPlayerCheckpointEx(playerid, -1706.9330,11.5702,3.2606, 5.0, CP_UBBCAR, INVALID_CHECKPOINT_TYPE);
return 1;
}
}
} -
Guten abend,
Und zwar geht mein UBB nicht so ganz, wenn ich ein fahrzeug mit ein Gutschein erstelle geht das Fahrzeug A,
wenn ich ein weiteres Fahrzeug erstelle wird anstadt Fahrzeug B das Neon an das Fahrzeug A dran gemacht und gespeichert.
Ich bin bisschen am verzweifeln.Code:
case DIALOG_GUTSCHEIN_UBB2:
{
if(response)
{
for(new vehSlot=0;vehSlot<MAX_PLAYER_VEHICLES;vehSlot++)
{
new type = listitem+1;
switch(type)
{
case 1: // Blau
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 2: // Grün
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3: // Weiß
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 4: // Pink
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 5: // Gelb
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6: // Rot
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
}
new query[256];
PrivateVehicle[playerid][vehSlot][vehNeonID] = type;
format(query, sizeof(query), "UPDATE `script_vehicles` SET `vehNeonID` = '%d' WHERE `vehBesitzer` = '%s' AND `Slot` = '%d'",type,PrivateVehicle[playerid][vehSlot][vehBesitzer],vehSlot);
mysql_function_query(myCon, query, false, "", "");
SendClientMessage(playerid, COLOR_WHITE, "* Dein Gutschein wurde erfolgreich eingelöst.");
SendClientMessage(playerid, COLOR_WHITE, "* Das Fahrzeug wurde geliefert Du findest es auf Map.");
SetPlayerCheckpointEx(playerid, -1706.9330,11.5702,3.2606, 5.0, CP_UBBCAR, INVALID_CHECKPOINT_TYPE);
return 1;
}
}
}Vielleicht kann der liebe Jeffry: mir helfen.
-
Hallo,
Wenn ich zuhause bin kann ich Dir ein Wetter system schreiben.
wenn Du noch keins gefunden hast. -
Habe auch einen mit 0.20€ ungefähr.
0833-8966-3097-9339 (DE,Offline)
-
-
stock IsVehicleATaxi(vehicleid)
{
for(new i=0;i<sizeof(Taxi);i++)
{
if(vehicleid == Taxi[i])
return 1;
}
return 0;
} -
Jetzt kommt nichts mehr in der Log, ingame wird es auch angezeigt.
Jetzt wenn ich /fare eingebe steht da ich sitze in keinem Taxi..
eher gesagt es geht nur bei einem Taxi die anderen 8 gehen nicht.
Befehl:
CMD:fare(playerid)
{
if(!IsLoggedIn(playerid))return 1;
if(Spieler[playerid][pTutorial] > 0)return SendClientMessage(playerid, COLOR_GREY, "Du bist derzeit im Tutorial, und kannst keine Befehle benutzen.");
if(Spieler[playerid][pTaxiDuty] == 1)return SendClientMessage(playerid, COLOR_GREY, "Du bist derzeit mit einen Taxi unterwegs.");
new vehicleid = GetPlayerVehicleID(playerid);
for(new i=0;i<sizeof(Taxi);i++){
if(GetPlayerVehicleID(playerid) != IsVehicleATaxi(vehicleid))return SendClientMessage(playerid, COLOR_GREY, "* Du sitzt in keinem Taxi.");
ShowPlayerDialog(playerid, DIALOG_TAXIFARE, DIALOG_STYLE_MSGBOX, "Taxi Company", "Willkommen im Taxi Company,\nDie Fahrgäste bezahlen jede 100 Meter 40$\nDer Sprit wird in manchen fällen vom Staat bezahlt.\n", "Bestätigen", "Abbruch");
}
return 1;
} -
Im Streamer.inc ist es drinne.
native Streamer_SetFloatData(type, {Text3D,_}:id, data, Float:value);
#define STREAMER_TYPE_3D_TEXT_LABEL (5)Auf dem Server wird es auch angezeigt ?
-
Guten Tag,
Und zwar bekomme ich dies in er Log angezeigt.Log:
[16:15:40] *** Streamer_SetFloatData: Invalid ID specified
[16:15:40] *** Streamer_SetFloatData: Invalid ID specifiedZeilen:
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, Vehicle[Taxi[i]][TaxiText], E_STREAMER_ATTACH_OFFSET_Z, 1.0);
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, Vehicle[Taxi[i]][TaxiText], E_STREAMER_ATTACH_OFFSET_Y, 1.0);Weiss leider nicht den Fehler