Jump to content

Proplem


NissanGT

Recommended Posts

Hello I have worked this code but I do not know what problem do I want any one shows errors

Forfeits

Client

  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 0.90) 
  
        noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1]) 
        guiSetProperty(noteam, "NormalTextColour", "FFF93905") 
        nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1]) 
        guiSetProperty(nill, "NormalTextColour", "33FAF9F9") 
        exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1]) 
        guiSetProperty(exit, "NormalTextColour", "B504C41A") 
        GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1]) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9) 
        for i = 1, 2 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false) 
        GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true) 
        GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-small") 
        guiLabelSetColor(GUIEditor.label[1], 247, 75, 127) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
        dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
    end 
) 
  
addEventHandler('onClientGUIClick',root, 
function () 
if (source ==noteam ) then 
 triggerServerEvent ( 'noteam', localPlayer ) 
  
end 
               end 
 addEventHandler('onClientGUIClick',root, 
function () 
if (source == nill ) then 
 triggerServerEvent ( 'nill', localPlayer ) 
  
end 
               end 
 addEventHandler('onClientGUIClick',root, 
function () 
if (source == exit ) then 
 triggerServerEvent ( 'exit', localPlayer ) 
  
end 
               end 
  

Server

addEvent( 'noteam', true ) 
addEventHandler( 'noteam', root,function() 
setPlayerTeam(source,nil) 
  
                outputChatBox ( "You Now No Team", source) 
    end 
) 
addEvent( 'exit', true ) 
addEventHandler( 'exit', root,function() 
setPlayerTeam(source,nil) 
  
                outputChatBox ( "Nill Team Done", source) 
    end 
) 
addEvent( 'exit', true ) 
addEventHandler( 'exit', root,function() 
guisetVisbile(   GUIEditor.window[1] ,false) 
                outputChatBox ( "Exit GUI Done", source) 
    end 
) 

Edited by Guest
Link to comment
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 0.90) 
  
        noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1]) 
        guiSetProperty(noteam, "NormalTextColour", "FFF93905") 
        nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1]) 
        guiSetProperty(nill, "NormalTextColour", "33FAF9F9") 
        exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1]) 
        guiSetProperty(exit, "NormalTextColour", "B504C41A") 
        GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1]) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9) 
        for i = 1, 2 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false) 
        GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true) 
        GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-small") 
        guiLabelSetColor(GUIEditor.label[1], 247, 75, 127) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
        dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
    end) 
  
  
addEventHandler( "onClientGUIClick", resourceRoot, function(  ) 
    if ( source == exit ) then 
    guiSetVisible (GUIEditor.window[1],false) 
    end 
end) 
  
addEventHandler( "onClientGUIClick",function(  ) 
    if ( source == noteam ) then 
    triggerServerEvent ( 'noteam', localPlayer ) 
    end 
end) 
  
addEventHandler( "onClientGUIClick",function(  ) 
    if ( source == nill ) then 
    triggerServerEvent ( 'nill', localPlayer ) 
    end 
end) 

addEvent( 'noteam', true ) 
addEventHandler( 'noteam', root,function() 
setPlayerTeam(source,nil) 
                outputChatBox ( "You Now No Team", source) 
    end) 
  
addEvent( 'exit', true ) 
addEventHandler( 'exit', root,function() 
setPlayerTeam(source,nil) 
    outputChatBox ( "Nill Team Done", source) 
    end) 

Edited by Guest
Link to comment
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 0.90) 
  
        noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1]) 
        guiSetProperty(noteam, "NormalTextColour", "FFF93905") 
        nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1]) 
        guiSetProperty(nill, "NormalTextColour", "33FAF9F9") 
        exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1]) 
        guiSetProperty(exit, "NormalTextColour", "B504C41A") 
        GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1]) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9) 
        for i = 1, 2 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false) 
        GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true) 
        GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-small") 
        guiLabelSetColor(GUIEditor.label[1], 247, 75, 127) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
        dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
    end) 
  
  
addEventHandler( "onClientGUIClick", resourceRoot, function(  ) 
    if ( source == exit ) then 
    guiSetVisible (GUIEditor.window[1],false) 
    end 
end) 
  
addEventHandler( "onClientGUIClick", resourceRoot, function(  ) 
    if ( source == noteam ) then 
    triggerServerEvent ( 'noteam', localPlayer ) 
    end 
end) 
  
addEventHandler( "onClientGUIClick", resourceRoot, function(  ) 
    if ( source == nill ) then 
    triggerServerEvent ( 'nill', localPlayer ) 
    end 
end) 

addEvent( 'noteam', true ) 
addEventHandler( 'noteam', root,function() 
setPlayerTeam(source,nil) 
                outputChatBox ( "You Now No Team", source) 
    end) 
  
addEvent( 'exit', true ) 
addEventHandler( 'exit', root,function() 
setPlayerTeam(source,nil) 
    outputChatBox ( "Nill Team Done", source) 
    end) 

Can Added BindKey ?

Link to comment
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) 

Edited by Guest
Link to comment
Wraite In All Code Pleaz
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 0.90) 
  
        noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1]) 
        guiSetProperty(noteam, "NormalTextColour", "FFF93905") 
        nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1]) 
        guiSetProperty(nill, "NormalTextColour", "33FAF9F9") 
        exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1]) 
        guiSetProperty(exit, "NormalTextColour", "B504C41A") 
        GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1]) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9) 
        for i = 1, 2 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false) 
        GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true) 
        GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-small") 
        guiLabelSetColor(GUIEditor.label[1], 247, 75, 127) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
        dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false) 
    end) 
  
  
addEventHandler( "onClientGUIClick", resourceRoot, function(  ) 
    if ( source == exit ) then 
    guiSetVisible (GUIEditor.window[1],false) 
    end 
end) 
  
addEventHandler( "onClientGUIClick",function(  ) 
    if ( source == noteam ) then 
    triggerServerEvent ( 'noteam', localPlayer ) 
    end 
end) 
  
addEventHandler( "onClientGUIClick",function(  ) 
    if ( source == nill ) then 
    triggerServerEvent ( 'nill', localPlayer ) 
    end 
end) 
  
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) 

addEvent( 'noteam', true ) 
addEventHandler( 'noteam', root,function() 
setPlayerTeam(source,nil) 
                outputChatBox ( "You Now No Team", source) 
    end) 
  
addEvent( 'nill', true ) 
addEventHandler( 'nill', root,function() 
setPlayerTeam(source,nil) 
    outputChatBox ( "Nill Team Done", source) 
    end) 

Edited by Guest
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...