Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. الثاني اشوفه افضل / https://community.multitheftauto.com/ind ... ls&id=2136 تقدر تستخدمه من خلال الوظائف الموجوده . dxCreate/Window/StaticImage/Edit/...
  2. تستخدم كمعالج للأخطاء مثل الديبوق . مثال : function word() return 'One' + 2 end function errorMessage(x) return outputChatBox('Error : '..x) end outputChatBox(xpcall(word,errorMessage)) IDs = { 611, 400 } random_ = IDs[math.random(#IDs)] اسم الموضوع استفسارات البرمجة يعني اي شي ماتعرفه تستفسر عنه هنا وماشوف انك كاتب للأشياء الصعبة في الموضوع !! انا اقصد استفسارات بالاشياء الصعبه مو السهله !
  3. انت كذا تبحث داخل القاعده بواسطه الداتا المحفوظه . INSERT : عشان تضيف تستخدم
  4. ما ادري ليش كل واحد مسوي يتفلسف ويحط فنكشنات وهو عارف انه ( مستحيل ) يسوي الكود .
  5. انت الي راح تقرر تحتاج او لا . مثلا عندك جريد وتبي تحط فيه 10 شخصيات , وين تشوف احسن تسوي كذا table_ = { { 'skin 1',0}, {'skin 2', 1}, {'skin 3', 2} } for k,v in ipairs(table_) do guiGridListSetItemText(myGrid,guiGridListAddRow(myGrid),1,v[1],false,false) end ولا كذا : guiGridListSetItemText(myGrid,guiGridListAddRow(myGrid),1,'skin 1',false,false) guiGridListSetItemText(myGrid,guiGridListAddRow(myGrid),1,'skin 2',false,false) guiGridListSetItemText(myGrid,guiGridListAddRow(myGrid),1,'skin 3',false,false) من غير انه لازم تتحقق لو اختار الشخصيه رقم 1 او 2 ... مشوار , الجدول تختصر فيه ع الاقل 20 سطر
  6. من الاساس لو ماعرفت السينتاكس ما تقدر تسوي الكود .
  7. من قالك لازم دافور؟ يا رجال جدول الضرب مو عارفه
  8. اي صحيح عاشق هذي المعلومه ماقد انتبهت لها .
  9. حبيبي تأكد من الخطأ ؟ تأكد ان القيم ولوحه التسجيل شغاله كلها ؟
  10. اكثر الي تعلموا كانوا يدخلون المنتدى بإستمرار , يتابعون الاكواد الي تنطرح ويسألون كيف جاء كذا ... انت مالك وجود بقسم البرمجه .
  11. سويه كذا , dxText = {} dxText_mt = { __index = dxText } local idAssign,idPrefix = 0,"c" local g_screenX,g_screenY = guiGetScreenSize() local visibleText = {} ------ local defaults = { fX = 0.5, fY = 0.5, bRelativePosition = true, strText = "", bVerticalAlign = "center", bHorizontalAlign = "center", tColor = {255,255,255,255}, fScale = 1, strFont = "default", strType = "normal", tAttributes = {}, bPostGUI = false, bClip = false, bWordWrap = true, bVisible = true, tBoundingBox = false, --If a bounding box is not set, it will not be used. bRelativeBoundingBox = true, } local validFonts = { default = true, ["default-bold"] = true, clear = true, arial = true, pricedown = true, bankgothic = true, diploma = true, beckett = true, } local validTypes = { normal = true, shadow = true, border = true, stroke = true, --Clone of border } local validAlignTypes = { center = true, left = true, right = true, } function dxText:create( text, x, y, relative ) assert(not self.fX, "attempt to call method 'create' (a nil value)") if ( type(text) ~= "string" ) or ( not tonumber(x) ) or ( not tonumber(y) ) then outputDebugString ( "dxText:create - Bad argument", 0, 112, 112, 112 ) return false end local new = {} setmetatable( new, dxText_mt ) --Add default settings for i,v in pairs(defaults) do new[i] = v end idAssign = idAssign + 1 new.id = idPrefix..idAssign new.strText = text or new.strText new.fX = x or new.fX new.fY = y or new.fY if type(relative) == "boolean" then new.bRelativePosition = relative end visibleText[new] = true return new end function dxText:text(text) if type(text) ~= "string" then return self.strText end self.strText = text return true end function dxText:position(x,y,relative) if not tonumber(x) then return self.fX, self.fY end self.fX = x self.fY = y if type(relative) == "boolean" then self.bRelativePosition = relative else self.bRelativePosition = true end return true end function dxText:color(r,g,b,a) if not tonumber(r) then return unpack(self.tColor) end g = g or self.tColor[2] b = b or self.tColor[3] a = a or self.tColor[4] self.tColor = { r,g,b,a } return true end function dxText:scale(scale) if not tonumber(scale) then return self.fScale end self.fScale = scale return true end function dxText:visible(bool) if type(bool) ~= "boolean" then return self.bVisible end self.bVisible = bool if bool then visibleText[self] = true else visibleText[self] = nil end return true end function dxText:destroy() self.bDestroyed = true setmetatable( self, self ) return true end function dxText:extent() local extent = dxGetTextWidth ( self.strText, self.fScale, self.strFont ) if self.strType == "stroke" or self.strType == "border" then extent = extent + self.tAttributes[1] end return extent end function dxText:height() local height = dxGetFontHeight ( self.fScale, self.strFont ) if self.strType == "stroke" or self.strType == "border" then height = height + self.tAttributes[1] end return height end function dxText:font(font) if not validFonts[font] then return self.strFont end self.strFont = font return true end function dxText:postGUI(bool) if type(bool) ~= "boolean" then return self.bPostGUI end self.bPostGUI = bool return true end function dxText:clip(bool) if type(bool) ~= "boolean" then return self.bClip end self.bClip = bool return true end function dxText:wordWrap(bool) if type(bool) ~= "boolean" then return self.bWordWrap end self.bWordWrap = bool return true end function dxText:type(type,...) if not validTypes[type] then return self.strType, unpack(self.tAttributes) end self.strType = type self.tAttributes = {...} return true end function dxText:align(horzA, vertA) if not validAlignTypes[horzA] then return self.bHorizontalAlign, self.bVerticalAlign end vertA = vertA or self.bVerticalAlign self.bHorizontalAlign, self.bVerticalAlign = horzA, vertA return true end function dxText:boundingBox(left,top,right,bottom,relative) if left == nil then if self.tBoundingBox then return unpack(boundingBox) else return false end elseif tonumber(left) and tonumber(right) and tonumber(top) and tonumber(bottom) then self.tBoundingBox = {left,top,right,bottom} if type(relative) == "boolean" then self.bRelativeBoundingBox = relative else self.bRelativeBoundingBox = true end else self.tBoundingBox = false end return true end addEventHandler ( "onClientRender", getRootElement(), function() for self,_ in pairs(visibleText) do while true do if self.bDestroyed then visibleText[self] = nil break end local l,t,r,b --If we arent using a bounding box if not self.tBoundingBox then --Decide if we use relative or absolute local p_screenX,p_screenY = 1,1 if self.bRelativePosition then p_screenX,p_screenY = g_screenX,g_screenY end local fX,fY = (self.fX)*p_screenX,(self.fY)*p_screenY if self.bHorizontalAlign == "left" then l = fX r = fX + g_screenX elseif self.bHorizontalAlign == "right" then l = fX - g_screenX r = fX else l = fX - g_screenX r = fX + g_screenX end if self.bVerticalAlign == "top" then t = fY b = fY + g_screenY elseif self.bVerticalAlign == "bottom" then t = fY - g_screenY b = fY else t = fY - g_screenY b = fY + g_screenY end elseif type(self.tBoundingBox) == "table" then local b_screenX,b_screenY = 1,1 if self.bRelativeBoundingBox then b_screenX,b_screenY = g_screenX,g_screenY end l,t,r,b = self.tBoundingBox[1],self.tBoundingBox[2],self.tBoundingBox[3],self.tBoundingBox[4] l = l*b_screenX t = t*b_screenY r = r*b_screenX b = b*b_screenY end local type,att1,att2,att3,att4,att5 = self:type() if type == "border" or type == "stroke" then att2 = att2 or 0 att3 = att3 or 0 att4 = att4 or 0 att5 = att5
  12. ممكن موت ورا بعض اكثر من مره ؟ يعني يمكن يسوي انتحار من الفري روم اكثر من مره .
  13. ^ تحذفها ؟ -__- وبعدين كذا صحيح اصلا . G.KinG @ عدل الي قالك زاحف فقط لا تعدل هذا exports['killmessages']:outputMessage...
  14. -- Server Side # addEventHandler('onPlayerSpawn', root,function() if getPlayerTeam(source) and getTeamName( getPlayerTeam(source) ) == 'Police' then setTimer( function( source ) setElementPosition( source, 1893.33215,489.56143,36.00030 ) setElementModel( source , 230 ) setPedArmor( source, 1000 ) end,1000,1,source) end end )
  15. اقصد هات التريقر من الكلينت , addEvent('hideLoginWindow',true) addEventHandler('hideLoginWindow',root,function()
  16. حبيبي كيف الكود صح ؟ player : source غير معرفه بدلها بـ setPedSkin : setElementModel ماراح يشتغل في الاصدارات الجايه , استبدلها بـ
  17. لو تلاحظ بالسينتاكس , bool colorCoded=false يعني ما تقدر تحط الوان الهيكس , لو حطيت ترو تقدر مثلا حق الشات بالضبط
  18. اقصد يوم يسجل الدخول التريقر الي من السيرفر للكلينت .
  19. ^ صحيح , ما فكرت بالحدث .
  20. الموضوع قلب مهزله ! وبعدين البندر ترا الحدث ماله دخل
  21. ايش الي صعب مع انه سهل جدا , يعني كأن عندك اختبار فراغات وكمل الفراغات , الفقره الاولى : givePlayerMoney(...., ....) طيب الحين نروح للويكي عشان نبرشم bool givePlayerMoney ( player thePlayer, int amount ) thePlayer: the player you are giving the money to. amount: a positive integer number specifying the amount of money to give to the player. كذا نضمن اننا بنجيب 10 في الاختبار
  22. حبيبي شغال عندك عشان تكلمني كذا ؟ showforallteam اطرح التريقر الي مسوي فيه .
  23. -- Server Side # addCommandHandler ( 'setstyle',function ( _, _, player ) if player and isElement( getPlayerFromName(player) ) then if getElementModel( getPlayerFromName(player) ) == skin and getPedFightingStyle ( getPlayerFromName(player) ) ~= 6 then setPedFightingStyle ( getPlayerFromName(player), 6 ) end end end ) * skin : ايدي الشخصيه . مثآل : setstyle Ra7sErEom وتقدر تسوي تايمر لو غير الشخصيه تروح من عنده حركه الكارتيه .
×
×
  • Create New...