Jump to content

Help guys :/


Recommended Posts

Posted

Hello,

I have problem its with 23 line. Look on ss, "AllowScreenUpload" cant check bcz bad argument :x

Whats wrong?

mta-screen-2015-05-01-15-19-22.png

addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "test", false) 
        guiWindowSetSizable(spawnScreenMenu, false) 
        guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") 
        spawnScreenOKButton = guiCreateButton(10, 385, 50, 20, "Close", true, spawnScreenMenu) 
        guiSetFont(spawnScreenOKButton, "default-bold-small") 
  
        GUIEditor.label[1] = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) 
        guiSetFont(GUIEditor.label[1], "clear-normal") 
        guiWindowSetMovable ( spawnScreenMenu, false ) 
        guiWindowSetSizable ( spawnScreenMenu, false ) 
        --------------------------------------------------------------------- 
        spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) 
        guiGridListSetSelectionMode ( spawnScreenGridList, 2 )--ensure the selection mode is one per column 
        guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) 
        guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) 
        local info = dxGetStatus() 
        for k, v in pairs( info ) do 
                --add a new row to our gridlist each time 
                local row = guiGridListAddRow ( spawnScreenGridList ) --get our new row 
                --next, we set that rows text to the weapon name.  Column is 1 since the "Shotguns" column was created first. 
                guiGridListSetItemText ( spawnScreenGridList, row, 2, v, false, false ) 
                guiGridListSetItemText ( spawnScreenGridList, row, 1, k, false, false ) 
                 
    end 
    row = 0 
end 
) 

Please Help,

Posted
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "test", false) 
        guiWindowSetSizable(spawnScreenMenu, false) 
        guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") 
        spawnScreenOKButton = guiCreateButton(10, 385, 50, 20, "Close", true, spawnScreenMenu) 
        guiSetFont(spawnScreenOKButton, "default-bold-small") 
  
        GUIEditor.label[1] = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) 
        guiSetFont(GUIEditor.label[1], "clear-normal") 
        guiWindowSetMovable ( spawnScreenMenu, false ) 
        guiWindowSetSizable ( spawnScreenMenu, false ) 
        --------------------------------------------------------------------- 
        spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) 
        guiGridListSetSelectionMode ( spawnScreenGridList, 2 )--ensure the selection mode is one per column 
        guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) 
        guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) 
        local info = dxGetStatus() 
        for k, v in pairs( info ) do 
                --add a new row to our gridlist each time 
                local row = guiGridListAddRow ( spawnScreenGridList ) --get our new row 
                --next, we set that rows text to the weapon name.  Column is 1 since the "Shotguns" column was created first. 
                guiGridListSetItemText ( spawnScreenGridList, row, 2, tostring(v), false, false ) 
                guiGridListSetItemText ( spawnScreenGridList, row, 1, tostring(k), false, false ) 
                
    end 
    row = 0 
end 
) 

Posted

Hello again,

I have problem as u can see on ss "test" i used

guiSetText(spawnScreenMenu,getPlayerName(localPlayer)) 

why its showing my nick when i geting other players video? :x

Posted
Hello again,

I have problem as u can see on ss "test" i used

guiSetText(spawnScreenMenu,getPlayerName(localPlayer)) 

why its showing my nick when i geting other players video? :x

post full code here

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
        spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "", false) 
        guiSetVisible(spawnScreenMenu, false) 
        guiWindowSetSizable(spawnScreenMenu, false) 
        guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") 
         
        przycisk = guiCreateButton(10, 385, 50, 20, "Close", false, spawnScreenMenu) 
        guiSetFont(przycisk, "default-bold-small")   
         
  
        owner = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) 
        guiSetFont(owner, "clear-normal") 
        guiWindowSetMovable ( spawnScreenMenu, true ) 
        guiWindowSetSizable ( spawnScreenMenu, false ) 
        spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) 
        guiGridListSetSelectionMode ( spawnScreenGridList, 2 ) 
        guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) 
        guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) 
         
addEvent("getResInfo", true) 
addEventHandler("getResInfo", resourceRoot, 
function()       
      
  
             
        --------------------------------------------------------------------- 
        local sw,sh = guiGetScreenSize() 
        local info = dxGetStatus() 
        table_info = {} 
        table_info1 = {} 
        guiSetText(spawnScreenMenu,getPlayerName(localPlayer)) 
        table.insert(table_info,{"Screen Width",sw}) 
        table.insert(table_info,{"Screen Height",sh}) 
        for i ,v in pairs (info ) do 
        table.insert(table_info,{i,v}) 
            end 
        triggerServerEvent("send:data",resourceRoot,table_info) 
  
end) 
  
  
addEvent("openWindow", true) 
addEventHandler("openWindow", resourceRoot, 
function(info)           
  
             guiGridListClear (spawnScreenGridList) 
            guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) 
            showCursor ( guiGetVisible ( spawnScreenMenu ) ) 
            guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) 
             
     
                for k, v in ipairs( info ) do 
                 
                local row = guiGridListAddRow ( spawnScreenGridList ) 
                guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring(v[2]), false, false ) 
                guiGridListSetItemText ( spawnScreenGridList, row, 1, tostring(v[1]), false, false ) 
                 
                 
    end 
  
end) 

Posted

I trying to make example: I have nick Nitro and i used command /getvideo Caddy and it's showing in gui but nick Nitro not his nick (Caddy)

Posted
I trying to make example: I have nick Nitro and i used command /getvideo Caddy and it's showing in gui but nick Nitro not his nick (Caddy)

As far as i know you can't get the dx Status of an other player.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
lol, can u open mta? i can show u :) if yes come server Ganja Mafia

post screen shot here and as i told you can't. only your dx status.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

i'm pretty sure that there is somethig wrong in your code , post full code here (server;client) side.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

man i told you can't get the dx status of an other player .

anyways if you want to see his name just try this :

-- Server side

setTimer( function() triggerClientEvent(thePlayer,"openWindow",resourceRoot,data_table,pTarget) end,1000,1 ) 

-- Client side

addEvent("openWindow", true) 
addEventHandler("openWindow", resourceRoot, 
function(info,player)          
    guiGridListClear (spawnScreenGridList) 
    guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) 
    showCursor ( guiGetVisible ( spawnScreenMenu ) ) 
    guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) 
    guiSetText(spawnScreenMenu,getPlayerName(player)) 
    for k, v in ipairs( info ) do 
    local row = guiGridListAddRow ( spawnScreenGridList ) 
    guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring(v[2]), false, false ) 
    guiGridListSetItemText ( spawnScreenGridList, row, 1, tostring(v[1]), false, false )                   
    end 
  
end) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

still dont working :(

client.lua.46 Bad Argument @ 'guiSetText' [Expected string at argument 2, got boolean] 

client.lua.46 Bad Argument @ 'getPlayerName' [Expected string at argument 1, got nil] 

Posted

Man many things wrong in your code. more than that as i told you you can't get some one else dx status.

Anyways try this

Client :

addEventHandler( "onClientResourceStart", getRootElement( ), 
function() 
    spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "", false) 
    guiSetVisible(spawnScreenMenu, false) 
    guiWindowSetSizable(spawnScreenMenu, false) 
    guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") 
    przycisk = guiCreateButton(10, 385, 50, 20, "Close", false, spawnScreenMenu) 
    guiSetFont(przycisk, "default-bold-small")   
    owner = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) 
    guiSetFont(owner, "clear-normal") 
    guiWindowSetMovable ( spawnScreenMenu, true ) 
    guiWindowSetSizable ( spawnScreenMenu, false ) 
    spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) 
    guiGridListSetSelectionMode ( spawnScreenGridList, 2 ) 
    guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) 
    guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) 
end  
)       
  
  
addEvent("openWindow", true) 
addEventHandler("openWindow", root, 
function(player)          
    local info = dxGetStatus( ) 
    guiGridListClear (spawnScreenGridList) 
    guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) 
    showCursor ( guiGetVisible ( spawnScreenMenu ) ) 
    guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) 
    guiSetText(spawnScreenMenu,getPlayerName(player)) 
    for k, v in ipairs( info ) do 
    local row = guiGridListAddRow ( spawnScreenGridList ) 
    guiGridListSetItemText ( spawnScreenGridList, row, 1, k, false, false ) 
    guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring( v ), false, false ) 
    end 
end) 
  
  
addEventHandler( "onClientGUIClick", root, 
function () 
    if source == przycisk then 
    guiSetVisible ( spawnScreenMenu, false ) 
    showCursor (false ) 
    guiSetInputEnabled ( true ) 
    end 
end) 

* Server side:

function komenda(thePlayer, cmd, theTarget) 
    if isElement(thePlayer) then  
        if theTarget then 
        local pTarget = findPlayer(theTarget) 
        if (isElement(pTarget)) then 
         triggerClientEvent(thePlayer,"openWindow",thePlayer,pTarget)  
        else 
            outputChatBox("No player matches with "..theTarget, thePlayer, 255, 0, 0) 
        end 
    else 
            outputChatBox("Syntax: /checkvideo ", thePlayer, 255, 100, 0, true) 
        end 
    end 
end  
addCommandHandler("cvideo",komenda) 
  
  
function findPlayer( player ) 
    if ( player and type( player ) == "string" ) then 
        local playerElement = getPlayerFromName( player ) 
        if ( playerElement ) then return playerElement end 
        local playersCounted = 0 
        local player = string.lower(player) 
        local spl = split( player, string.byte( "[" ) ) 
        if ( spl ) then 
            player = table.concat( spl, ";" ) 
        end 
        for k, v in pairs( getElementsByType( "player" ) ) do 
            local name = string.lower( getPlayerName( v ) ) 
            local spl = split( name, string.byte( "[" ) ) 
            if ( spl ) then 
                name = table.concat( spl, ";" ) 
            end 
            if ( string.find( name, player ) ) then 
                playerElement = v 
                playersCounted = playersCounted + 1 
            end 
        end 
        if ( playerElement and playersCounted == 1 ) then 
            return playerElement 
        end 
        return false 
    else 
        return false 
    end 
end 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
man i told you can't get the dx status of an other player .

anyways if you want to see his name just try this :

-- Server side

setTimer( function() triggerClientEvent(thePlayer,"openWindow",resourceRoot,data_table,pTarget) end,1000,1 ) 

-- Client side

addEvent("openWindow", true) 
addEventHandler("openWindow", resourceRoot, 
function(info,player)          
    guiGridListClear (spawnScreenGridList) 
    guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) 
    showCursor ( guiGetVisible ( spawnScreenMenu ) ) 
    guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) 
    guiSetText(spawnScreenMenu,getPlayerName(player)) 
    for k, v in ipairs( info ) do 
    local row = guiGridListAddRow ( spawnScreenGridList ) 
    guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring(v[2]), false, false ) 
    guiGridListSetItemText ( spawnScreenGridList, row, 1, tostring(v[1]), false, false )                   
    end 
  
end) 

it's working!!!! Thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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