-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
i don't understand why you are using event onPlayerLogin when an player join to server it's almost will not be in team also what do you think? the element data will set only when the player join, you're joining your server and restart the script and you will say (not work) lol you should set the element data when you using setPlayerTeam.
-
what is firefly? also do you think that anyone here will script this for you? If you can't make that then learn and make it by yourself or pay some one to make it for you.
-
what is not work? does the vehicle exist?
-
طف المود من الكونسول
-
https://wiki.multitheftauto.com/wiki/AddEventHandler https://wiki.multitheftauto.com/wiki/Event_system https://wiki.multitheftauto.com/wiki/Client so for example if we attach the trigger to root there will be no source and to know who was the client trigger we use client variable addCommandHandler("name", function() triggerServerEvent("onGreeting",root) end) addEvent("onGreeting", true) addEventHandler("onGreeting", root function() outputChatBox("The client name is: "..getPlayerName(client)) end) also if we use localPlayer Instead of root the source will be the localPlayer and client will be the same as localPlayer and here source is the same client (source == client) so we can use source and we can use client no difference addEventHandler("onClientGUIClick",GridlOwnerCar,function(button) if(button=="left")then local rowindex, columnindex = guiGridListGetSelectedItem ( GridlOwnerCar ) local carname = guiGridListGetItemText ( GridlOwnerCar, rowindex, columnindex) triggerServerEvent("PCar", localPlayer, carname) end end,false) addEvent("PCar",true) addEventHandler("PCar",root,function(carname) if(carname ~= "")then for i,cars in ipairs(getElementsByType("vehicle")) do if(getVehicleName(cars)==carname)then createBlipAttachedTo(cars,0,3,0,0,0,0,0,65535,client) end end end end)
-
What is the difference between client and source?
-
lol if(carname=="")then should be if(carname ~= "")then
-
Yes that what i want I want attached a blip to vehicle name that are saved into grid list
-
getVehicleModelFromName Returns an integer and createBlipAttachedTo first Argument Required element ----------------------------------- hey topic owner are you F*** idiot or what? you want attached a blip to vehicle name that are saved into grid list? epic fail
-
جرب تطفي بالمودات واحد واحد و بتكشف المود المسبب للكراش
-
function PinCar(thePlayer) local vehicule = getPedOccupiedVehicle(thePlayer) if (vehicule) then local blip = createBlipAttachedTo(vehicule, 19, 4, 255, 0, 0, 255, 0, 99999.0, thePlayer) else outputChatBox("vehicule not found",thePlayer,255,0,0) end end addEvent("PinCar", true) addEventHandler("PinCar", getRootElement(), PinCar) if you show the trigger this would be better
-
viewtopic.php?f=148&t=40809
-
no sure, he edit it before you post with more than 1 hour
-
lol, my bad I wrote it quickly
-
you can't read or what?
-
نفس الكود ما غيرت شي حبيبي من قال أن الكود الي حطيته أنا يصك ميوت من أف1؟ و من قال لك يبي يعطل الأف 1 عن طريق الأدمنية؟ قال يبي كود و عطيناه وخلاص بلا زياده مشاركات -_-"
-
--Client Side-- triggerServerEvent("updateInfo",localPlayer) statsmain = guiCreateWindow(200,200,500,500,"userpanel",false) maintab = guiCreateTabPanel(0,0.06,1,1,true,statsmain) tabserver= guiCreateTab("stats ",maintab) ModeLable = guiCreateLabel(0.50,0.33,0.96,0.22,"",true,tabserver) function info(message) guiSetText(ModeLable,"Game Mode: "..message) end addEvent("gtype",true) addEventHandler("gtype",root,info) --Server Side-- function sendmaininfo() triggerClientEvent(source,"gtype",source,getGameType()) end addEvent("updateInfo",true) addEventHandler("updateInfo",root, sendmaininfo)
-
you means this? https://wiki.multitheftauto.com/wiki/GetAllElementData
-
لازم تعدل على الفريروم function toggleFRWindow() if getElementData(loaclPlayer,"muteF1") then return end if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end تبي تصك ميوت أف1 ؟ خخ بسيطة setElementData(player,"muteF1",true) تبي تفك؟ setElementData(player,"muteF1",false)
-
https://wiki.multitheftauto.com/wiki/GetGameType https://wiki.multitheftauto.com/wiki/GetMapName https://wiki.multitheftauto.com/wiki/GetPlayerAccount https://wiki.multitheftauto.com/wiki/GetAccountName local Country = call(getResourceFromName("admin"), "getPlayerCountry", source) طبعاً كلهم سيرفر وعشان تقدر تستخدمها بالكلينت لازم تسوي تريقر أو تستخدم الدتا https://wiki.multitheftauto.com/wiki/TriggerClientEvent https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/GetElementData
-
somethings like this maybe local drugtimerrest function timerAnzeigen() -- when I click the OK btn guiSetVisible(Drugs_Window,false) guiSetVisible(Create_Window,true) restminuten = 20 guiSetText(Create_LBL_Timer, tonumber(restminuten).." Minuten") if isTimer(drugtimerrest) then killTimer(drugtimerrest) end drugtimerrest = setTimer(updateTimerZeit,1000,0) end function updateTimerZeit() restminuten = restminuten - 1 if restminuten <= 0 then if isTimer(drugtimerrest) then killTimer(drugtimerrest) end guiSetVisible(Create_Window,false) else guiSetText(Create_LBL_Timer, tonumber(restminuten).." Minuten") end end if you tell us what you trying to make we will be able to help you better
