
huyjvguyen
Members-
Posts
98 -
Joined
-
Last visited
Everything posted by huyjvguyen
-
i mean , i want to make a cinema room and show a video for all player in this room.
-
i mean i want to dx a video and sync all people nearby this
-
How to cinema with video steam for all player stay nearby??
-
hi, i have a question, How to create a cinema on server? all player can watch a film i setup?
-
My ideas are very difficult to explain, but i got a problem: when i make 3 client function function1 --> function2 -->function3 ( the element function 1 not send to function3) but when i make just 2 funtion function1 -- > function2 ( the element on function 1 when send to function2 and trigger server function)
-
i think , error in function testbtn, this function not trigger id leb
-
client: function tesst() wwindow = guiCreateWindow(100, 100, 100,100,"tesst gui" , false) edit = guiCreateEdit(10, 20, 20, 20,"", fasle, wwindow) btn = guiCreateButton(10, 25, 10, 10,"test btn", wwindow) addEventHandler("onClientGUIClick", btn, testbtn, false) end bindKey("l", "down", tesst) function testbtn() leb = guiGetText(edit) triggerServerEvent("trigger", getLocalPlayer(), player, leb) end server: function trig(player, leb) outputChatBox("say"..tostring(leb), source) outputChatBox("say"..tostring(leb), player) end addEvent("trigger", true) addEventHandler("trigger", getRootElement(), trig) debug is : bad arg??
-
i want make a marker when player hit this marker, they will have a car , and setimer destroy car when they exit car, if thePlayer enter car , script will killtimer desroy. this is my code markers = {} markers[1] = createMarker( 1923.009765625, 1242.271484375, 62.886322021484, "cylinder", 1, 255, 255, 0, 200) --markers[2] = createMarker(-709, 966, 12, "cylinder", 1, 255, 255, 0, 200) vehicle ={} function onMarkerHitGiveVehicle(hitPlayer) if getElementType(hitPlayer) == "player" then if (isElement(vehicle[hitPlayer])) then outputChatBox("You did took a car", hitPlayer) else local x, y, z = getElementPosition(hitPlayer) vehicle[hitPlayer] = createVehicle(514,x,y,z) setElementData(hitPlayer,"car",Vehicle[hitPlayer]) warpPedIntoVehicle(hitPlayer,vehicle[hitPlayer]) addEventHandler("onVehicleExit", getRootElement(),destime) addEventHandler("onVehicleEnter", getRootElement(),killtime) end end end function des(player, veh) local veh = getElementData(player ,"car") if veh then destroyElement(veh) end end function destime() kill = setTimer(onMarkerHitGiveVehicle, 5000,1) outputChatBox("Get in car in 10s or the car will be destroyed",hitPlayer) end function killtime() killTimer(kill) outputChatBox("Pls don't get out the car",hitPlayer) end addEventHandler("onMarkerHit",getRootElement(),onMarkerHitGiveVehicle)
-
I mean, want to have one script code to send the complete car, sending the car into the parking space, the car will teleport to the member not see When members take the car out, the car will teleport back to the default You can their application code so script is not! please !!
-
Hello,im have a problem with Script parking.Why all members have seen several cars parking in the table , otherwise what is extra ? Helps me!. if some body have that script ,can you give me that scritp.Thanks!
-
function giveMoney(thePlayer) if thePlayer then givePlayerMoney(thePlayer, 400000) outputChatBox("Bạn đã lấy 400000" , thePlayer) end end addEvent("gmoney", true) addEventHandler("gmoney", root, giveMoney) function start(thePlayer, commandName) triggerEvent("gmoney", thePlayer) end addCommandHandler("smoney", start) what wrong? not give money and not debug on cmd mtasa server?
-
triggerClientEvent( thePlayer, "onStat", hoursplayed) debug is: bad argument @ 'triggerClientEvent' [expected element at argument 3, got number 4
-
toggleControl ( source, "???", true ) ??? = what is aim to freeze player?
-
i use it ? it's right? function money(thePlayer, commandName) name = getPlayerName local money = exports.mysql:query("SELECT `money` FROM `accounts` WHERE `id` = ' "..name .." ' ") if (money < 100) then outputChatBox("you are bad" , thePlayer ) else outputChatbox("you are handsome boy" , thePlayer) end end addCommandHandler("checkmoney", root, money)
-
need help with triggerServerEvent and addEvent
huyjvguyen replied to huyjvguyen's topic in Scripting
tks -
how to give player money on click button client function panel() w = guiCreateWindow(x,y,w,h,"money",false) b =guiCreateButton(x,y,w,h,"moneyb", true, w) function trigger() triggerServerEvent("moneyhere") --it's right ?? end addEventHandler("onClientGUIClick", b, trigger) -- it is right? end serrver function givemoney(thePlayer) if name then givePlayerMoney(thePlayer, 10000) end end addEvent("moneyhere",true) addEventHandler("moneyhere", getLocalPlayer(), givemoney) -- and this??? give player money when they click button b on w
-
well, i was tried. it's not spawm any car,can you give me this full file.?
-
Marker = createMarker ( 1693.478515625, 1447.8671875, 10,"cylinder",0.5,255,0, 0,255) Veh = {} function spawmvehicle(thePlayer) if getElementType(thePlayer) ~= "player" then return end if isElement(Veh[thePlayer]) then return end local px,py,pz = getElementPosition(thePlayer) Veh[thePlayer] = createVehicle(533, px, py, pz ) end addEventHandler("onMarkerHit", Marker, spawmvehicle) addEventHandler("onVehicleExit",root, function() if ( source == Veh[source] ) then setTimer(destroyElement,10000,1,Veh[source]) end end ) this, it's not spawm any vehicle
-
yep i was, the marker created but not spawm vehiel ??
-
the marker is not created ??
-
i need exaple, when player A nearby player B , player A can freezy player B?