AmLotte
Wiek: 42 Na forum: 2478 dni Posty: 43
Nick w MP: AmLotte
Piwa : 381
Jak doda? trigera do servera? Nie ogarniam kompletnie.
server:
Kod: local blip = createBlip(2034.87366, 1529.79492, 10.82031, 46,2,0,0,0,0,0,175)
local startpraca = createMarker ( 2034.87366, 1529.79492, 10.82031, "cylinder", 1.5, 255, 255, 0, 170 )
function pracuj (thePlayer)
local car = createVehicle ( 541, 2044.61206, 1527.45496, 10.07390 ) -- ID auto, x,y,z
warpPlayerIntoVehicle ( thePlayer, car )
setElementData(plr, "player:job", true)
end
addEventHandler( "onMarkerHit", startpraca, pracuj )
function greetingHandler ( message )
outputChatBox ( "The client says: " .. message, client )
local blipdowoz = createBlip(2040.67383, 1421.91565, 10.09045, 10,2,0,0,0,0,0,175)
end
addEvent( "onGreeting", true )
addEventHandler( "onGreeting", resourceRoot, greetingHandler )
Kod: client:
function greetingCommand ( commandName )
triggerServerEvent ( "onGreeting", resourceRoot, "Hello World!" )
-- Source can be this resource as it saves on CPU and prevents event name conflicts with other resources but you can't use resourceRoot if another resource will handle the event.
end
addCommandHandler ( "greet", greetingCommand )