-
Posts
347 -
Joined
-
Last visited
Everything posted by YourMind
-
لو كانت الاكواد كلينت يبقي انت اللي هاتشوف الاسكن اتغيرت انما باقي الاعبين هايشوفوك بنفس الاسكن اللي انت كنت بيها قبل ماتغيرها يعني الاسكن تعتبر مش محطوطالك triggerServerEvent استخدم
-
ايه اللي دخل الاسكنات و التيمات بالموضوع ? D: اطرحلي الكلينت اشوفه
-
جربته حالياً شغال عندي اتأكد انك مش معاك رتبة الفي اي بي
-
Skins = {140,228,227,189} function checkPlayerModel(player) for i,v in ipairs(Skins) do if getElementModel(player) == v then return true end end return false end addEventHandler("onElementModelChange",root, function(oldSkin) local accName = getAccountName ( getPlayerAccount ( source ) ) if getElementType(source) == "player" and checkPlayerModel(source) then if not isGuestAccount( getPlayerAccount ( source ) ) then if not isObjectInACLGroup ('user.'..accName, aclGetGroup ( "VIP" ) ) then setTimer(function(source) outputChatBox("This Skin only for VIP.", source, 255, 0, 0, true) setElementModel(source,oldSkin) end,500,1,source) end end end end)
-
قصده لما ييجي يدوس علي اي لاعب بالماوس يطرده addEventHandler ("onElementClicked",root, function (_,_,plr) if getElementType(source) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(plr)),aclGetGroup("Police")) then kickPlayer (source,plr) end end end)
-
function elementClicked(_,_,plr) if getElementType (source) == "player" then triggerClientEvent(plr,"openGui",plr) removeElementData (plr,"bugfix") removeEventHandler ("onElementClicked",plr,elementClicked) end end addEvent("check2",true) addEventHandler("check2",root, function() local acc = getPlayerAccount(source) if isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("Police")) then if not getElementData (source,"bugfix") then addEventHandler("onElementClicked",source,elementClicked) setElementData (source,"bugfix",true) else outputChatBox ("The event is already handled",source,255,5,5) end else outputChatBox("You are not police or admin",source,255,255,255) end end )
-
addCommandHandler("createTeam", function(p,c,n,r,g,b) if createTeam(tostring(n),tonumber(r),tonumber(g),tonumber(b)) then outputChatBox("#00ff00#[TeamsSystem]: Team "..n.." created by "..getPlayerName(p).." ",root,255,255,255) end end)
-
-- server function setVehicleColorful (v,bool) if not isElement (v) then return end if bool == true then triggerClientEvent (root,"Colorful",root,v) addEventHandler ("onPlayerJoin",root,function() if not isElement (v) then return end triggerClientEvent (source,"Colorful",source,v) end) setElementData (v,"Colorful",true) return true elseif bool == false then if getElementData (v,"Colorful") then removeElementData (v,"Colorful") end end return false end addEventHandler ("onVehicleEnter",root, function (p) v = source plr = p setTimer(function() if getElementType (plr) == "player" and getPlayerSerial (plr) == "Serial" and getElementDimension (plr) == 30 then setVehicleColorful (v,true) addEventHandler ("onVehicleExit",v, function () setVehicleColorful (v,false) end) end end,1200,1) end) --client function c(veh) if getElementData (veh,"Colorful") then setVehicleColor (veh,math.random(0,255),math.random(0,255),math.random(0,255)) else cancelEvent() end end addEvent ("Colorful",true) addEventHandler ("Colorful",root, function (veh) addEventHandler ("onClientRender",root,function () c(veh) end) end)
-
'onPlayerLogin' isObjectInACLGroup triggerClientEvent - l = guiCreateLabel(,,,,) guiSetVisible addEvent addEventHandler guiSetVisible
-
https://wiki.multitheftauto.com/wiki/GetPlayerAcls
-
local Groups = { {'Console',"#FF0000console"}, {'Admin',"ادمن"}, {'SuperModerator',"مراقب"}, {'Moderator',"مشرف"}, } addEventHandler("onPlayerLogin", root, function () for _,v in ipairs (Groups) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(v[1])) then setElementData (source,"MASRIY",v[2]) end end end) addEventHandler("onPlayerLogout",root, function () if getElementData (source,"MASRIY") then removeElementData (source,"MASRIY") end end) function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center", _, _, _, true) end end end end local www = dxCreateFont("arial.ttf",13) addEventHandler("onClientRender",root, function () for i,k in ipairs (getElementsByType("player")) do if k ~= localPlayer and getElementData (k,"MASRIY") then dxDrawTextOnElement(k,getElementData (root,"MASRIY") or 'none',1,20,0,0,255,255,1,www) end end)
-
addEvent ("playerteam",true) addEventHandler ("playerteam",root, function (amm,plr) if not tonumber(amm) then return outputChatBox("ادخل الرقم الدم الدي تريد ارسله ",source,255,0,0) end if getElementHealth(source) <= tonumber(amm) then return outputChatBox("ليس لديك الدم الكافي ",source,255,0,0) end if plr == getPlayerFromName(getPlayerName(source)) then return outputChatBox("لا تستطيع ارسل دم الي نفسك",source,255,0,0) end setElementHealth(plr,getElementHealth(plr) + tonumber(amm)) local HB1 = getElementHealth(source) setElementHealth(source,HB1- tonumber(amm)) outputChatBox ("تم التحويل",source,0,255,0) end)
-
function OpenWin() if removeEventHandler("onClientRender",root,Dx) then removeEventHandler("onClientRender",root,Dx) guiSetVisible (GUIEditor.button[1], false ) guiSetVisible (GUIEditor.edit[1] , false ) guiSetVisible(GUIEditor.gridlist[1],false) guiSetVisible(GUIEditor.Player,false) guiSetVisible(GUIEditor.button[2] ,false) guiSetVisible(GUIEditor.label[7] ,false) showCursor(false) showChat(true) else addEventHandler("onClientRender",root,Dx) guiSetVisible (GUIEditor.button[1], true ) guiSetVisible (GUIEditor.edit[1] , true ) guiSetVisible(GUIEditor.gridlist[1],true) guiSetVisible(GUIEditor.Player,true) guiSetVisible(GUIEditor.button[2] ,true) guiSetVisible(GUIEditor.label[7] ,true) showCursor(true) showChat(false) guiGridListClear(GUIEditor.gridlist[1]) end for _,v in ipairs (getPlayersInTeam(getTeamFromName("TeamName"))) do local Row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],Row,cow,getPlayerName(v),false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],Row,cow,53, 53, 201, 255) end end bindKey("F4","down",OpenWin)
-
غير مجرب v={} addEventHandler ("onPlayerCommand",root, function () if v[source] >= 5 then cancelEvent() outputChatBox ("SPAM",source,255,5,5) v[source] = 0 end v[source] = v[source] + 1 setTimer(function(source) v[source] = 0 end,1500,1,source) end)
-
function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end return false end addCommandHandler ("OpenPanel", function (plr,_,plrName) if getPlayerFromPartialName(plrName) then triggerClientEvent (getPlayerFromPartialName(plrName),"oPanel",getPlayerFromPartialName(plrName),getPlayerName(plr)) else return outputChatBox ("هذا الاعب غير موجود",plr,255,5,5) end end) addEvent ("oPanel",true) addEventHandler ("oPanel",root, function (plrName) guiSetVisible(wnd,true) guiSetInputEnabled(true) showCursor (true) guiSetText (label,plrName.." تم فتح اللوحة من قبل") --or --guiSetText(wnd,plrName.." تم فتح اللوحة من قبل") end)
-
فنكشناتي صح بس حسبته عايز ينقل من الجريد ليست دة لدة guiGridListRemoveRow مش هاتحتاج
-
ايوة انت بتقول مش فاهم كلامك اي مستطيل؟ و ازاي يضبط مش فاهم؟
-
لما الكلام اللي جوا الايديت يتغير و يكون 1 يطلعلك رسالة في الشات؟ هو دة المطلوب ؟ او ايه هو المطلوب بالظبط؟
-
"onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText guiGridListAddRow guiGridListRemoveRow
-
addEventHandler("onClientGUIChanged", root, function() if source == Servermemo then if guiGetText(source) == 1 then outputChatBox("1",255,0,0) end end end)
