Szerző Téma: SetVehicleColor  (Megtekintve 1212 alkalommal)

SetVehicleColor
« Dátum: 2015. Június 23. - 21:18:37 »
0
Sziasztok az lenne a kérdésem hogy Kliens oldalon hogy lehet beálitani egy kocsinak a színét ? Mert Szerver oldalon müködöt kliensen nem .

SetVehicleColor
« Válasz #1 Dátum: 2015. Június 24. - 02:58:10 »
0
ugyanúgy mint szerveroldalon

Nem elérhető Nexus

SetVehicleColor
« Válasz #2 Dátum: 2015. Június 24. - 20:12:19 »
0
Ha kliens oldalon állítod át a kocsi színét, csak az a játékos fogja látni, akinek az oldalán történt. Ha szeretnéd, hogy mindenki lássa, https://wiki.multitheftauto.com/wiki/TriggerServerEvent ;).

SetVehicleColor
« Válasz #3 Dátum: 2015. Június 26. - 13:56:51 »
0
Kliens oldal:
 

addCommandHandler(\"setcolor\",
function(commandName, color, color2)
if tonumber(color) and tonumber(color2) then
   local veh = getPedOccupiedVehicle(localPlayer)
   if veh then
      triggerServerEvent(\"changeVehicleColor\", localPlayer, veh, color, color2)
      outputChatBox(\"Sikeresen átszínezted a járművet.\", 255, 255, 255, true)
   else
      outputChatBox(\"Járműben kell ülnöd ahhoz, hogy át tudd színezni a járművet.\", 255, 255, 255, true)
   end
else
   outputChatBox(\"[Használat]: /\" .. commandName .. \" [szín 1] [szín 2]\", 255, 255, 255, true)
end
end
)

 
Szerver oldal:
 

addEvent(\"changeVehicleColor\", true)
addEventHandler(\"changeVehicleColor\", getRootElement(),
function(veh, color, color2)
if veh then
   setVehicleColor(veh, color, color2, color, color2)
end
end
)

SetVehicleColor
« Válasz #4 Dátum: 2015. Június 26. - 22:15:46 »
0
Nekem nem szerveren kell hanem kliensen es vki tudna irni egy nagyon egyszeru peldát .Es tudom hogy mi a kulonbseg Kliens es Szerver kozot de nekem nem mukodot a Kliens oldalon a setvehicleColor azert kertem segitseget

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal