vehicle-framework | Pojednostavljene funkcije za vozila | Nove stvari | Fixevi!

Započeo Mergevos, Septembar 22, 2021, 15:50:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Tip: Include/Biblioteka
Slike ili Video: Nema, ako treba skontace se nesto
Opis i dodatne informacije: Evo ovako. Ovo je bukvalno jedna biblioteka koja pomaze da lakse ispisete sistem za vozila. Koristi se da bi uprostio neke funkcije, koristi neke funkcije koje samp nema, kompaktibilan je sa odredjenim brojem YSF funkcija i ima aktivnog developera. Ukoliko pronadjete neki bug, mozete pisati ovde ili otvoriti issue na github repositorijumu. Koristi fixes biblioteku, u kojoj takodje ima mojih doprinosa bas zbog ove biblioteke, ima mogucnost zmigavaca, grupe vozila, sve cime ste morali da manipulisete, ako se tako mozemo izraziti, framework radi za vas. Koristi tagove. Krivo mi je sto nisam najbolje objasnio na wikipediji repozitorija, ali uskoro cu i to ispisati sve.

Lista funkcija:
Vehicle_ReturnName(vehicleid, name[], len=sizeof(name))
Vehicle_GetMass(vehicleid)
Vehicle_Create(modelid, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay, interior, virtual_world, bool:addsiren=false)
Vehicle_CreateEx(modelid, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay, interior, virtual_world, Float: health, const plate[MAX_NUMBER_PLATE], bool:addsiren=false)
Vehicle_GetGroupByName(const name[])
Vehicle_GroupHas(VehicleGroup: groupid, vehicleid)
VehicleGroup: Vehicle_GroupInit(const name[])
Vehicle_IsValidGroup(VehicleGroup: groupid)
Vehicle_AddToGroup(VehicleGroup: groupid, vehicleid)
Vehicle_RemoveFromGroup(VehicleGroup: groupid, vehicleid)
Vehicle_ClearGroup(VehicleGroup: groupid)
Vehicle_IsEmptyGroup(VehicleGroup: groupid)
Vehicle_GroupDestroy(VehicleGroup: groupid)
Vehicle_Destroy(idx)
Vehicle_SetBlinking(VEHICLE_FRAMEWORK_TAGS: vehicleid, e_BLINKERS: side, bool:skip=false, tag=tagof(vehicleid)) //0 - left 1 - right 2 - emergy
Vehicle_IsBlinking(vehicleid)
Vehicle_CancelBlinking(vehicleid)
Vehicle_GetEngineState(vehicleid)
Vehicle_SetEngineState(VEHICLE_FRAMEWORK_TAGS: id, e_ENGINE_STATES: engine_state, tag=tagof(id))
Vehicle_GetDriveType(vehicleid)
Vehicle_GetEngineType(vehicleid)
Vehicle_GetBootState(vehicleid)
Vehicle_SetBootState(VEHICLE_FRAMEWORK_TAGS: id, e_BOOT_STATES: boot_state, tag=tagof(id))
Vehicle_GetBonnetState(vehicleid)
Vehicle_SetBonnetState(VEHICLE_FRAMEWORK_TAGS: id, e_BONNET_STATES: bonnet_state, tag=tagof(id))
Vehicle_GetObjectiveState(vehicleid)
Vehicle_SetObjectiveState(VEHICLE_FRAMEWORK_TAGS: id, e_OBJECTIVE_STATES: objective_state, tag=tagof(id))
Vehicle_SetLightsState(VEHICLE_FRAMEWORK_TAGS: id, e_LIGHT_STATES: left_lights, e_LIGHT_STATES: right_lights, e_LIGHT_STATES: back_lights, tag=tagof(id))
Vehicle_GetLightsState(vehicleid, &e_LIGHT_STATES: left_lights, &e_LIGHT_STATES: right_lights, &e_LIGHT_STATES: back_lights)
Vehicle_SetLightsRunState(VEHICLE_FRAMEWORK_TAGS: id, e_LIGHT_RUN_STATE: light_state, tag=tagof(id))
Vehicle_GetLightsRunState(vehicleid)
Vehicle_SetAlarms(VEHICLE_FRAMEWORK_TAGS: id, e_ALARMS_STATE: alarm_state, tag=tagof(id))
Vehicle_GetAlarms(vehicleid)
Vehicle_SetDoorState(VEHICLE_FRAMEWORK_TAGS: id, e_DOOR_STATES: hood, e_DOOR_STATES: trunk, e_DOOR_STATES: driver, e_DOOR_STATES: passenger, tag=tagof(id))
Vehicle_GetDoorState(vehicleid, &e_DOOR_STATES: bonnet, &e_DOOR_STATES: boot, &e_DOOR_STATES: driver, &e_DOOR_STATES: passenger)
Vehicle_GetDoorsLockState(vehicleid)
Vehicle_SetDoorsLockState(VEHICLE_FRAMEWORK_TAGS: id, e_DOOR_LOCK_STATES: door_state, tag=tagof(id))
Vehicle_SetTireState(VEHICLE_FRAMEWORK_TAGS: id, e_TIRE_STATUS: rear_right_tire, e_TIRE_STATUS: front_right_tire, e_TIRE_STATUS: rear_left_tire, e_TIRE_STATUS: front_left_tire, tag=tagof(id))
Vehicle_GetTireState(vehicleid, &e_TIRE_STATUS: rear_right_tire, &e_TIRE_STATUS: front_right_tire, &e_TIRE_STATUS: rear_left_tire, &e_TIRE_STATUS: front_left_tire)
Vehicle_GetNumberPlate(vehicleid, plate[], len = sizeof(plate))
Vehicle_SetNumberPlate(VEHICLE_FRAMEWORK_TAGS: id, const plate[], tag=tagof(id))
Vehicle_GetWindowsNumber(vehicleid)
Vehicle_SetWindows(VEHICLE_FRAMEWORK_TAGS: id, e_WINDOWS_STATES: driver, e_WINDOWS_STATES: passenger, e_WINDOWS_STATES: backleft, e_WINDOWS_STATES: backright, tag=tagof(id))
Vehicle_GetWindows(vehicleid, &e_WINDOWS_STATES: driver, &e_WINDOWS_STATES: passenger, &e_WINDOWS_STATES: backleft, &e_WINDOWS_STATES: backright)
Vehicle_SetPanelStates(VEHICLE_FRAMEWORK_TAGS: id, e_PANEL_STATES: front_left_panel, e_PANEL_STATES: front_right_panel, e_PANEL_STATES: back_left_panel, e_PANEL_STATES: back_right_panel, tag=tagof(id))
Vehicle_GetPanelStates(vehicleid, &e_PANEL_STATES: front_left_panel, &e_PANEL_STATES: front_right_panel, &e_PANEL_STATES: back_left_panel, &e_PANEL_STATES: back_right_panel)
Vehicle_SetBumperStates(VEHICLE_FRAMEWORK_TAGS: id, e_PANEL_STATES: front_bumper, e_PANEL_STATES: rear_bumper, tag=tagof(id))
Vehicle_GetBumperStates(vehicleid, &e_PANEL_STATES: front_bumper, &e_PANEL_STATES: rear_bumper)
Vehicle_GetWindshieldState(vehicleid, &e_PANEL_STATES: windshield)
Vehicle_SetColor(VEHICLE_FRAMEWORK_TAGS: id, color1, color2, tag=tagof(id))
Vehicle_GetColor(vehicleid, &color1, &color2)
Vehicle_SetInterior(VEHICLE_FRAMEWORK_TAGS: id, interiorid, tag=tagof(id))
Vehicle_GetInterior(vehicleid)
Vehicle_SetVirtualWorld(VEHICLE_FRAMEWORK_TAGS: id, virtual_world, tag=tagof(id))
Vehicle_GetVirtualWorld(vehicleid)
Vehicle_SetDimensionInfo(VEHICLE_FRAMEWORK_TAGS: id, interiorid, virtual_world, tag=tagof(id))
Vehicle_GetDimensionInfo(vehicleid, &interiorid, &virtualworld)
Vehicle_SetPaintjob(VEHICLE_FRAMEWORK_TAGS: id, paintjobid, tag=tagof(id))
Vehicle_GetPaintjob(vehicleid)
Vehicle_GetSeatsNumber(vehicleid)
Vehicle_IsOccupied(vehicleid)
Vehicle_GetLastDriver(vehicleid)
Vehicle_AttachTrailer(vehicleid, trailerid)
Vehicle_DetachTrailer(vehicleid)
Vehicle_GetTrailer(vehicleid)
Vehicle_GetTrailerCab(trailerid)
Vehicle_SetRespawnDelay(VEHICLE_FRAMEWORK_TAGS: id, respawn_delay, tag=tagof(id))
Vehicle_GetRespawnDelay(vehicleid)
Vehicle_GetOccupiedTime(vehicleid)
Vehicle_GetRespawnedTime(vehicleid)
Vehicle_GetSirenEnable(vehicleid)
Vehicle_AddComponent(VEHICLE_FRAMEWORK_TAGS: id, componentid, tag=tagof(id))
Vehicle_RemoveComponent(vehicleid, componentid)
Vehicle_CanHaveComponent(vehicleid, componentid)
Vehicle_GetComponentInSlot(vehicleid, e_VEHICLE_COMPONENT_SLOT: slot)
Vehicle_GetComponentType(vehicleid, componentid)
Vehicle_SetHealth(vehicleid, Float:health)
Vehicle_GetHealth(vehicleid, &Float:health = 0.0)
Vehicle_Repair(vehicleid)

Novi callbackovi:

OnVehicleFirstSpawn(vehicleid);
OnVehicleDestroy(vehicleid);
OnGroupInitialize(VehicleGroup: groupid);
OnGroupAdd(VehicleGroup: groupid, vehicleid);
OnGroupRemoveMember(VehicleGroup: groupid, vehicleid);
OnGroupClear(VehicleGroup: groupid);
OnVehiclePaintjobChange(vehicleid, paintjobid);
OnTrailerHook(vehicleid, trailerid);
OnTrailerUnhook(vehicleid, trailerid);
OnVehicleHealthChange(vehicleid, Float:health);

Postoji jos toga dosta da se objasni, pogledajte https://github.com/Mergevos/samp-vehicle-framework/wiki


Download link: ```sampctl p install Mergevos/samp-vehicle-framework``` ili ako ne koristite sampctl idite na https://github.com/Mergevos/samp-vehicle-framework/releases i skinite poslednju verziju.
Scan link: Github
Credits: Ja za pravljenje skripte, doprinosioci i svi ostali koji su nesto uradili ili dali neku ideju, i nekim tamo likovima ciji sam blinker system uzeo i integrisao u ovu biblioteku
- open.mp regional coordinator -

Veoma lijepo odradjeno.
Necu da zamaram sitnim PRovima ali

Vehicle_gsIsOccupied[MAX_VEHICLES][4]
Mislim da neka vozila imaju mogucnost smijestanja vise od 4 igraca u vozilu.

Iterator: Vehicle_gsGroups[VehicleGroup: MAX_VEHICLE_GROUPS]<MAX_VEHICLES>
Ovo bih imenovao drugacije npr
Vehicle_gsGroupVehicles
Logika iza ovoga je da tvoj iterator ne sadrzi grupe vozila nego vozila u grupi.

Sve u svemu, odavno niko sa nasih prostora nije napisao bas koristan include, i vrijeme je bilo.
Jako lijepo odaradjeno i veliki respect za offset blinkera :D

Citat: // xunder poslato Septembar 23, 2021, 20:32:57 POSLE PODNE
Veoma lijepo odradjeno.
Necu da zamaram sitnim PRovima ali

Vehicle_gsIsOccupied[MAX_VEHICLES][4]
Mislim da neka vozila imaju mogucnost smijestanja vise od 4 igraca u vozilu.

Iterator: Vehicle_gsGroups[VehicleGroup: MAX_VEHICLE_GROUPS]<MAX_VEHICLES>
Ovo bih imenovao drugacije npr
Vehicle_gsGroupVehicles
Logika iza ovoga je da tvoj iterator ne sadrzi grupe vozila nego vozila u grupi.

Sve u svemu, odavno niko sa nasih prostora nije napisao bas koristan include, i vrijeme je bilo.
Jako lijepo odaradjeno i veliki respect za offset blinkera :D

Hvala za sve, dobra opažanja.
Otvori samo issue i zapisi ovo na engleskom, bio bih zahvalan. <3
- open.mp regional coordinator -

Tema je refreshovana jer bih voleo da sto vise ljudi ostavi svoje mislenje, jer je ista biblioteka updated, i bice odrzavana zbog open.mp
- open.mp regional coordinator -


super super
Sunce greje lagano šetam se po Voždovcu
Moja kučka i ja, furam je na povodcu
Zove se Lola i nije nešto lepa
Ali meni daće lapo kada dokopa se repa
Rođena na ulici, dolazi iz geta
I zato je gangsta kučka, a ne starleta
Zahvaljujući njoj meni dignuta je đoka
Krov je spušten, vožnjica od bloka do bloka
I ako glumiš mangupa jebaće ti mamicu
U tašni nema lak za nokte, ali ima palicu
Odrasla na Medaku, iz huda je sestra
Nijedna Snoopova kučka nije tol'ko gangsta
Za nju sam 'Pac, ona moja je Madonna
Ako znaš još neku takvu javi mi preko fona
I kada njesra izbije ona ne vata pištolja
Već nabada na prvu jer je gangsta drolja