Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. @ ~Al-Ha[J]aRii~! : كودك راح يجيب المستوى حق كل اللاعبين في السيرفر ويطلعه في الشات @ Scorpio : إنت أخذت الفنكشنات اللي قلتلك عليها نسخهتا ولصقتها بأول كود ماله علاقة باللي طلبته -_-" ومسوي وظيفة ماتسوي ولا شي بآخر الكود ! لمن أقولك حاول أقصد حاول, مو إنسخ والصق وركب فوق بعض
  2. العفو ,, ولو عندك اي استسفار لا تتردد
  3. عشان تفهم الفكرة اكثر شوف اي مود تاج أدمن, تقريبا نفس الفكرة
  4. هي تستخدم لتعديد الخيارات وهذا الشي يساعد عل تجنب الأخطاء هو حطها كذا : LastClick = LastClick +1 or LastClick هو معرفه بالقيمة 0 LastClick طبعا LastClick لمن تضغط الزر السكربت راح يضيف 1 للقيمة المعرف تحت المتغير إللي هو قيمة المتغير نفسها or لو حصل أي خطأ أثناء العملية المود راح يتخطاها ويستخدم الخيار اللي بعد يعني كأنه قاعد يقول إن بعد الضغط على الزر المتغبر تزيد قيمته بواحد أو يبقى زي ماهو
  5. أمثلة الويكي واضحة زي عين الشمس, حركات عطني مثال وتاخذ وتمشي ما تنفع جرب وحاول واحنا ان شاء الله بساعدك قد ما نقدر
  6. PaiN^

    SWAT job

    @chronos : Tell me how he'll ever learn if we gave him ready scripts ?? It's not that the script is hard t make or not, Here we want people to learn how to script . Not giving them ready codes doesn't mean that we don't want to help ! ( Don't give me a fish, But teach me fishing )
  7. 1- استخدم : "onPlayerChat" getPlayerWantedLevel cancelEvent outputChatBox 2 - أعتقد في مود في الكوميونيتي زي كذا, دور عليه edit : community.multitheftauto.com/
  8. PaiN^

    Problems

    Debug errors ? If not, Post/PM the hole code .
  9. برستيج ممكن ترد على الخاص ؟ذذ
  10. addEventHandler( "onPlayerChat", root, function ( message ) if message:find( "lol" ) then cancelEvent( ) outputChatBox( "Message", root, 255, 255, 0, true ) end end )
  11. PaiN^

    Problems

    Try this : addEventHandler( "onClientGUIClick", root, function( ) if source == takeButton then if getElementData( localPlayer, "Occupation" ) == "Paramedic" then exports.DxChat:sayClientMessage( "Your job is already paramedic!", 255, 0, 0 ) return end local row = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if row and row ~= -1 then if row == skin1 and not getElementData( localPlayer, "Occupation" ) == "Paramedic" then triggerServerEvent( "takeJobAs274", localPlayer ) triggerEvent( "closeMedicWindow", root ) exports.DxChat:sayClientMessage( "You're now employed as paramedic!", 0, 255, 0 ) elseif row == skin2 and not getElementData( localPlayer, "Occupation" ) == "Paramedic" then triggerServerEvent( "takeJobAs275", localPlayer ) triggerEvent( "closeMedicWindow", root ) exports.DxChat:sayClientMessage( "You're now employed as paramedic!", 0, 255, 0 ) elseif row == skin3 and not getElementData( localPlayer, "Occupation" ) == "Paramedic" then triggerServerEvent( "takeJobAs276", localPlayer ) exports.DxChat:sayClientMessage( "You're now employed as paramedic!", 0, 255, 0 ) triggerEvent( "closeMedicWindow", root ) end end end end )
  12. يب عشان كذا أنا سويت الموضوع وحتى بعد ما حطيت كود كنج نفس الشي
  13. PaiN^

    Problems

    GuiGridListGetSelectedItemText
  14. سوي جدول وحط فيه الأيديات اللي تبيها ( columen ) بعدين سوي جريد فيه عمودين id والثاني الآيدي car1 وحط في الأول
  15. Try this : Client .. local msg = "" local player = nil local thereIsMessage = false local x,y = guiGetScreenSize() function drawMessage() scale = 1.2 font = "default-bold" h = dxGetFontHeight(scale, font) if player == nil then dxDrawColorText("#ff9900[server]#ffffff " .. msg,500, -1,x,250, tocolor(255,255,255),scale,font) else dxDrawColorText("#FF9900[server]#ffffff " .. msg ,500, -1,x,250, tocolor(255,255,255),scale,"default-bold") end end addEventHandler("onClientResourceStart", resourceRoot, function( ) if thereIsMessage then addEventHandler( "onClientRender", localPlayer, drawMessage( ) ) end end ) addEventHandler("onClientRender",getRootElement(),drawMessage) function newmsg(new) msg = new player = root thereIsMessage = true end addEvent("newmsg",true) addEventHandler("newmsg",getRootElement(),newmsg) function amoff() removeEventHandler("onClientRender", getRootElement(), drawMessage) end addEvent("amoff", true ) addEventHandler("amoff", getRootElement(), amoff) function rdx(msg) removeEventHandler ( "onClientRender", getRootElement(), drawMessage ) end addEvent("mR", true ) addEventHandler("mR", getRootElement(), rdx) function dxDrawBorderedText(text, xpos, ypos, w, h, color, scale, font) dxDrawText ( text, xpos - 1, ypos - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font ) -- black dxDrawText ( text, xpos + 1, ypos - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos - 1, ypos + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos + 1, ypos + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos - 1, ypos, w - 1, h, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos + 1, ypos, w + 1,h, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos, ypos - 1, w, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos, ypos + 1, w, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font ) dxDrawText ( text, xpos, ypos, w, h, color, scale, font) end function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default" if alignX then if alignX == "center" then ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2 elseif alignX == "right" then ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) end end if alignY then if alignY == "center" then ay = ay + (by - ay - dxGetFontHeight(scale, font))/2 elseif alignY == "bottom" then ay = by - dxGetFontHeight(scale, font) end end local alpha = string.format("%08X", color):sub(1,2) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(getColorFromString("#"..col..alpha)) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawBorderedText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(getColorFromString("#"..col..alpha)) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) dxDrawBorderedText(cap, ax, ay, ax + dxGetTextWidth(cap, scale, font), by, color, scale, font) end end
  16. You mean the script works, but you want the message to apper for any player that joins the server ?
  17. PaiN^

    رساله

    هو يبي رسالة لصاحب السيريال + اللي لمس الماركر
  18. getElementData > false لو الداتا مو معرفة ترجع nil ما ترجع
  19. PaiN^

    رساله

    function getPlayerFromSerial(serial) if serial and type(serial) == "string" then for i, v in ipairs(getElementsByType("player")) do if getPlayerSerial(v) == serial then return v end end end return false end addEventHandler ( "onMarkerHit", theMarker, function ( element ) if ( getElementType ( element ) == "player" ) then outputChatBox( "Welcome", element, 255, 255, 255, true ) outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ), 255, 255, 255, true ) end end, false ) كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين
  20. PaiN^

    رساله

    هو يبغى الرسالة توصل لشخص معين, مو اللي لمس الماركر
  21. هو كان قصده تزيد من قيمة الداتا نفسها, مثلا اوكي ( crimes ) انت عندك داتا معرفة كجرائم كل ما اللاعب دخل ماركر معين ازدادت قيمة الداتا 1 يعني لمن تبي تزيدها تسوي كذا مثلا : crimeMarker = createMarker( ... ) -- نسوي الماركر addEventHandler( "onMarkerHit", crimeMarker, function( player ) if getElementType( player ) == "player" then -- إذا العنصر اللي لمس الماركر كان لاعب local crimes = getElementData( player, "crimes" ) -- للاعب crimes نجيب الداتا المخزنة تحت المعرف if not crimes then --- إذا ما عنده داتا مخزنة تحت هذا المعرف setElementData( player, "crimes", 0 ) -- نعرف الداتا بقيمة صفر end setElementData( player, "crimes", crimes + 1 ) -- نزود واحد على الداتا end end )
×
×
  • Create New...