Jump to content

Mbtdaa

Members
  • Posts

    262
  • Joined

  • Last visited

Everything posted by Mbtdaa

  1. Mbtdaa

    custom map

    Ok i understand that but how can i start i custom map
  2. Mbtdaa

    custom map

    Function? Event?
  3. Mbtdaa

    custom map

    hi i want to do custom map have 10 minute if the 10 minute finsh or team have 100 kills change to another custom map
  4. Mbtdaa

    Problem "Top"

    thx dude but i have 1 row how can i do that and pleasefix the top for me <3
  5. Mbtdaa

    Problem "Top"

    i edit the cod function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end WindowTOP = guiCreateWindow(328, 125, 613, 514, "", false) guiSetProperty(WindowTOP, "CaptionColour", "FF00FF00") guiSetVisible(WindowTOP, false) guiWindowSetSizable(WindowTOP, false) guiWindowSetMovable(WindowTOP, false) centerWindow ( WindowTOP ) GridListTOP = guiCreateGridList(9, 27, 594, 477, false, WindowTOP) guiSetProperty( GridListTOP, "Disabled", "true" ) guiGridListAddColumn(GridListTOP, "Rank", 0.2) guiGridListAddColumn(GridListTOP, "Name", 0.2) guiGridListAddColumn(GridListTOP, "Money", 0.2) guiGridListAddColumn(GridListTOP, "Kills", 0.2) guiGridListAddColumn(GridListTOP, "Deaths", 0.2) function U( ) guiGridListClear( GridListTOP ) local players = getPlayersSortByKills ( ) for i = 1, 30 do local aRow = guiGridListAddRow( GridListTOP ) if ( players [ i ] )then guiGridListSetItemText( GridListTOP, aRow, 1, i ..'-', false, false ) guiGridListSetItemText( GridListTOP, aRow, 2, getPlayerName ( players [ i ].element ), false, false ) guiGridListSetItemText( GridListTOP, aRow, 3, tostring( players [ i ].kills ), false, false ) guiGridListSetItemText( GridListTOP, aRow, 4, getElementData ( players [ i ].element, 'Deaths' ), false, false ) end end end function getPlayersSortByKills ( ) local players = { } for index, player in ipairs ( getElementsByType ( "player" ) ) do table.insert ( players, { element = player, kills = getElementData ( player, "Kills" ) or 0, } ) end table.sort ( players, function ( a, b ) return ( tonumber ( a.kills ) or 0 ) > ( tonumber ( b.kills ) or 0 ) end ) return players end bindKey ( "F2" , "down" , function () if guiGetVisible ( WindowTOP , true ) then guiSetVisible ( WindowTOP , false ) showCursor ( false ) outputChatBox ( "Closed" , 255 , 0 , 0 , true ) else guiSetVisible ( WindowTOP , true ) showCursor ( true ) outputChatBox ( "Opened" , 0 , 255 , 0 , true ) end end ) server addEventHandler( "onPlayerQuit" ,root, function( ) local accP = getPlayerAccount( source ) if ( accP and not isGuestAccount( accP ) ) then local Deaths = tonumber( getElementData( source, "Deaths" ) ) or 0 local Kills = tonumber ( getElementData( source, "Kills" ) ) or 0 setAccountData(accP, "PlayerDeaths", Deaths ) setAccountData(accP, "PlayerKills", Kills ) end end ) addEventHandler( "onPlayerLogin", root, function( _,acc ) local DataDeaths = getAccountData(acc, "PlayerDeaths" ) local DataKills = getAccountData(acc, "PlayerKills" ) if ( DataDeaths and DataKills ) then setElementData( source, "Deaths", DataDeaths ) setElementData( source, "Kills", DataKills ) end end ) no problem in debugscript and i have iQuestion how can i set color off kill red and deaths yalow and money green and name blue thx,
  6. Mbtdaa

    Problem "Top"

    hi whats the problem function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end WindowTOP = guiCreateWindow(328, 125, 613, 514, "", false) guiSetProperty(WindowTOP, "CaptionColour", "FF00FF00") guiSetVisible(WindowTOP, false) guiWindowSetSizable(WindowTOP, false) guiWindowSetMovable(WindowTOP, false) centerWindow ( WindowTOP ) GridListTOP = guiCreateGridList(9, 27, 594, 477, false, WindowTOP) guiGridListClear ( GridListTOP ) guiSetProperty( GridListTOP, "Disabled", "true" ) rank = guiGridListAddColumn(GridListTOP, "Rank", 0.2) name = guiGridListAddColumn(GridListTOP, "Name", 0.2) money = guiGridListAddColumn(GridListTOP, "Money", 0.2) kills = guiGridListAddColumn(GridListTOP, "Kills", 0.2) deaths = guiGridListAddColumn(GridListTOP, "Deaths", 0.2) aRow = guiGridListAddRow( GridListTOP ) aRoww = guiGridListAddRow( GridListTOP ) aRowww = guiGridListAddRow( GridListTOP ) aRowwww = guiGridListAddRow( GridListTOP ) aRowwwww = guiGridListAddRow( GridListTOP ) guiGridListSetItemColor ( GridListTOP, aRow,rank, 0-0-255 ) guiGridListSetItemColor ( GridListTOP, aRoww,name , 255-255-0 ) guiGridListSetItemColor ( GridListTOP, aRoww,money , 127-255-0 ) guiGridListSetItemColor ( GridListTOP, aRowww,kills , 255-0-0 ) guiGridListSetItemColor ( GridListTOP, aRowwww,deaths , 250, 154, 255 ) bindKey ( "F2" , "down" , function () if guiGetVisible ( WindowTOP , true ) then guiSetVisible ( WindowTOP , false ) showCursor ( false ) outputChatBox ( "Closed" , 255 , 0 , 0 , true ) else guiSetVisible ( WindowTOP , true ) showCursor ( true ) outputChatBox ( "Opened" , 0 , 255 , 0 , true ) end end ) function createPlayerList ( ) if ( name ) then for id, player in ipairs ( getElementsByType ( "player" ) ) do local r, g, b = getPlayerNametagColor ( player ) guiGridListSetItemText ( GridListTOP, aRoww, name, color (getPlayerName ( player )), false, false ) guiGridListSetItemColor ( GridListTOP, aRoww, name, r, g, b ) end end end addEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList ) function color ( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end setElementData( localPlayer, "Kills", 0 ) setElementData( localPlayer, "Deaths", 0 ) addEventHandler ( "onClientPlayerWasted", root, function ( killer ) if ( killer and killer ~= source ) then local k = getElementData ( killer, "Kills" ) or 0 setElementData ( killer, "Kills", ( k + 1 ) ) end local d = getElementData ( source, "Deaths" ) or 0 setElementData ( source, "Deaths", ( d + 1 ) ) U ( ) end ) function U( ) local players = getPlayersSortByKills ( ) for i = 1, 30 do if ( players [ i ] )then guiGridListSetItemText( GridListTOP, aRow, 1, i ..'-', false, false ) guiGridListSetItemText (GridListTOP, aRowwwww, 1,tonumber(v.Money_), false, false) guiGridListSetItemText( GridListTOP, aRowww, 1, tostring( players [ i ].kills ), false, false ) guiGridListSetItemText( GridListTOP, aRowwww, 1, getElementData ( players [ i ].element, 'Deaths' ), false, false ) end end end function getPlayersSortByKills ( ) local players = { } for index, player in ipairs ( getElementsByType ( "player" ) ) do table.insert ( players, { element = player, kills = getElementData ( player, "Kills" ) or 0, } ) end table.sort ( players, function ( a, b ) return ( tonumber ( a.kills ) or 0 ) > ( tonumber ( b.kills ) or 0 ) end ) return players end
  7. وش صار معك ؟؟
  8. طيب افتح الديبوق وشوف وش يجيك
  9. بسيطة يبحث عن سجله
  10. تمام مفهومه يالغلا بس انا قصدي يوم ابستخدم زر بوظيفة معينة احتاج اني استخدم if source = button انا سؤال على ينففع اني استخدم صورة بدال الزر ؟ واذا ماينفع وش المستخدم لصورة لجعلها تفعل وظيفه معينة
  11. وش >> كيف احطهاا ووين ذكرتني بالفيس البريئ
  12. السلام عليكم if source تستخدم لزر والصورة ولا بس الزر
  13. الرجال قاعد يحاول يساعدك !
  14. اها ! اوك يعطيك العافية يابطل ومعليش عذبناك معنا
  15. تماام ظبط معي بس بغيت اسالك الحين المابات الثانية كلها بسوي فيها كذا *_* ولا وش الي كان مخرب الميتا ذا ؟؟
  16. الماب شغال تمام وهاذا الميتا <meta> <file src="621.txd"></file> <file src="621.dff"></file> <file src="gta_tree_palm.txd"></file> <file src="veg_palm03.dff"></file> <file src="song.mp3"></file> <script src="mtasource.lua" type="client" /> <script src="client2.lua" type="client"></script> <script src="client1.lua" type="client"></script> <script src="music.lua" type="client"></script> <script src="client.lua" type="client"></script> <script src="CSM.lua" type="client"></script> <info gamemodes="race" type="map" name="[DM].Kacsa v3 - Battle Scar" author=".Kacsa" version="1.3.0"></info> <map src="[DM]Kacsav3-Battle_Scar.map" dimension="0"></map> <settings> <setting name="#skins" value='[ "cj" ]'></setting> <setting name="#maxplayers" value="[ 128 ]"></setting> <setting name="#gamespeed" value="[ 1 ]"></setting> <setting name="#ghostmode" value='[ "true" ]'></setting> <setting name="#time" value="5:39"></setting> <setting name="#vehicleweapons" value='[ "true" ]'></setting> <setting name="#minplayers" value="[ 0 ]"></setting> <setting name="#weather" value="[ 1 ]"></setting> <setting name="#gravity" value="[ 0.008000 ]"></setting> <setting name="#waveheight" value="[ 0 ]"></setting> <setting name="#respawntime" value="[ 0 ]"></setting> <setting name="#locked_time" value="[ true ]"></setting> <setting name="#duration" value="[ 1800 ]"></setting> <setting name="#respawn" value='[ "none" ]'></setting> </settings> </meta>
  17. المشكلة انه يطلعلي اخطاء مود الريس نفسه والريس الاصلي حق اللعبة مايجيب لي اخطاء السكربت
  18. شكلي بطفشك معي ! ! بس نفس الحكاية ونفس الخطأ
  19. اعذرني المره الاولة كان في مشاكل بممود الريس نفسه وغيرته وجاتني مشاكل السكربت !
  20. جربت اسوي نافذة جديده عشان اعرف من وين الخطء كلنت GUIEditor = { label = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(509, 214, 326, 279, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(45, 63, 202, 91, "map", false, GUIEditor.window[1]) bindKey ( "F2" , "down" , function () if guiGetVisible ( GUIEditor.window[1] , true ) then guiSetVisible ( GUIEditor.window[1] , false ) showCursor ( false ) else guiSetVisible ( GUIEditor.window[1] , true ) showCursor ( true ) end end ) addEventHandler ( 'onClientRender',root, function ( ) local MapName = getElementData ( resourceRoot,'GetMapName' ) if MapName and MapName ~= false then guiSetText ( GUIEditor_Label[1],MapName ) end end ) سيرفر addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then setElementData ( resourceRoot,'GetMapName',tostring ( getResourceInfo ( resource,'name' ) or 'N/A' ) ) end end ) + لما اشغله وافك الديبوج مايجيني اخطاء من السكربت !
  21. جربت ونفس الحكاية @
  22. if MapName and MapName ~= false then
  23. WARINIG:uz\2.lua:42:Bad argument @ 'addEventHandler"[Expected element at argument 2 .got function
×
×
  • Create New...