-
Posts
1,304 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Ahmed Ly
-
You should be used function getKeyState on Client side Are you used the script on server side?
-
I tested it it's working for me post your full code
-
-- server Team = "ghosts" function blablabla (p, command) boss = getElementData(p,'boss')-- check the player Have data = true if boss == true then if getPlayerTeam( p ) then -- check if the player on team if getTeamName( getPlayerTeam( p ) ) == Team then -- check player on team ghosts outputChatBox("Done.",p,255,0,0,true) for loop = 69,79 do -- make loop setPedStat(p,loop, 999) -- set player stat end else outputChatBox("You Cant Use command",p,255,0,0,true) end else outputChatBox("You Cant Use command ",p,255,0,0,true) end else outputChatBox("You can not use this now while boss is activated.",p,255,0,0) end end addCommandHandler("team", blablabla)
-
Good job
-
local myShader = dxCreateShader( "shader.fx" ) showCursor(true) local sx_, sy_ = guiGetScreenSize ( ) sx, sy = sx_ / 1024, sy_ / 768 local myRenderTarget = dxCreateRenderTarget(sx*382,sy*157,true) MaxAngelOffsetRx = 40 MaxAngelOffsetRy = 40 addEventHandler("onClientRender", root, function() if (myRenderTarget) then dxSetRenderTarget(myRenderTarget,true) local x, y= getCursorPosition() dxDrawRectangle(sx*286*x/50,sy*271*y/50,sx*382,sy*157, tocolor(52, 202, 147, 255), false) dxSetRenderTarget() local rx,ry = (x-0.5)*MaxAngelOffsetRx,(y-0.5)*MaxAngelOffsetRy dxSetShaderTransform(myShader, -rx, ry,0 ) dxDrawImage( sx*286, sy*271, sx*382, sy*157, myShader ) end end)
-
create Marker https://wiki.multitheftauto.com/wiki/CreateMarker to change size Marker https://wiki.multitheftauto.com/wiki/SetMarkerSizet to set Health player https://wiki.multitheftauto.com/wiki/SetElementHealth https://wiki.multitheftauto.com/wiki/GetElementHealth events https://wiki.multitheftauto.com/wiki/OnMarkerHit https://wiki.multitheftauto.com/wiki/OnMarkerLeave that example how to change Marker style https://community.multitheftauto.com/index.php?p=resources&s=details&id=13506
-
1- صمم لوحة Dx 2- انسخ الاحداثيات متاع Dx 3- ثم الصق ا لاحداثيات دخل اي فكشنات DGS مثل DGS = exports.dgs --[[ dxDrawText("", 274, 274, 526, 362, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) نسخت الاحداثيات من هنا 274, 274, 526, 362 --]] color = tocolor(255,255,0,255)-- لون نص DGS:dgsDxCreateLabel ( 274, 274, 526, 362,"Dgs",false,nil,color,false,false,false,false,false,"center","top" )
-
https://f.top4top.net/p_6840gcl11.png
-
Table = { test = {1,2,3,4,5,6,7,6}, } table.sort(Table.test,function( a, b ) return( tonumber( a ) or 0 ) > ( tonumber( b ) or 0 ) end ) for i, v in ipairs ( Table.test ) do outputServerLog(""..v.."") end --[[ 1-7 2-6 3-6 4-5 5-4 6-3 7-2 8-1 --]]
-
table getElementsByType table.insert getElementData table.sort
-
JavaScript?
-
function gridRe() guiGridListClear( grid ) for i, v in ipairs( Ques ) do local row = guiGridListAddRow( grid ) guiGridListSetItemText( grid, row, 1, i .. ' -', false, false ) guiGridListSetItemText( grid, row, 2, tostring( v[1] ), false, false ) guiGridListSetItemColor( grid, row, 1, 255, 230, 58, 255 ) guiGridListSetItemColor( grid, row, 2, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) end end -- code function getNameAdmin (file,str,numberss,types,numbertypes) if type(file) == "string" and type(str) == "string" and type(numberss) == "number" then local root = xmlLoadFile (file) local node = xmlFindChild (root,str,numberss) local inte = xmlFindChild (node,types,numbertypes) local info = xmlNodeGetValue ( inte ) return info end end function wnd_W( ) local ee = guiGridListGetItemText( grid, guiGridListGetSelectedItem( grid ), 2 ) if ee == 'من هم أصحـاب السـيرفـر ؟' then for i = 0,1 do m = getNameAdmin("namexml.xml","Admins",0,"Admin",i) guiSetText( ansrmemo,""..m.."") end end end addEventHandler('onClientGUIClick', root, wnd_W ) <root> <Admins> <Admin>Source</Admin> <Admin>Mr.6rB</Admin> </Admins> </root>
-
good job
- 6 replies
-
- server
- synchronization
-
(and 1 more)
Tagged with:
-
function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end ------ color = {} function pro() color[1] = tocolor(255, 255, 255, 255) if isMouseInPosition(587, 428, 681, 454) then color[1] = tocolor(255, 0, 0, 255) end dxDrawRectangle(382, 327, 492, 230, tocolor(0, 0, 0, 126), true) dxDrawText("Kill", 587, 428, 681, 454,color[1], 1.00, "bankgothic", "left", "top", true, true, true, true, true) end
-
اطرح اكواد الكلنت
-
xAddToGroupFunction_ = function ( Group,Price,Name ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا ! ",source,255,0,0,true); end local Level = getElementData( source,'Level' ) if Level >= tonumber(Price) then aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); else outputChatBox("** مش معاك لفل كافي",source,255,0,0,true); end end addEvent("rank",true) addEventHandler("rank",root,xAddToGroupFunction_)
-
-- Clinet bindKey("F5","down", function() triggerServerEvent("open",localPlayer) end ) addEvent("open2",true) addEventHandler("open2",root, function (text,bool) if guiGetVisible(Window) == false then guiSetVisible(Window,bool) showCursor(bool) outputChatBox(""..text.."",255,0,0) else guiSetVisible(Window,false) showCursor(false) end end ) -- Server addEvent("open",true) addEventHandler("open",root, function () if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then triggerClientEvent(source,"open2",source,"welcome",true) end end )
-
"onPlayerVehicleEnter" triggerServerEvent guiSetVisible
