Jump to content

help


Mark0

Recommended Posts

blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) 
  
addEventHandler("onClientGUIClick", root, 
function () 
        if (source == blip) then 
    local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) 
    local Blip = createBlipAttachedTo ( player,56 ) 
        end 
end 
) 
  

Bad argument@'createBlipAttachedTo '

Edited by Guest
Link to comment

Try this:

blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) 
  
addEventHandler("onClientGUIClick", root, 
function (player) 
        if (source == blip) then 
    local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) 
    local Blip = createBlipAttachedTo ( player, 22 ) 
        end 
end 
) 

Link to comment

if not work my previus try this:

blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) 
  
addEventHandler("onClientGUIClick", root, 
function (player) 
        if (source == Blip) then 
    local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) 
    local Blip = createBlipAttachedTo ( player, 22 ) 
        end 
end 
) 

Edited by Guest
Link to comment

this must work

blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) 
  
addEventHandler("onClientGUIClick", root, 
function () 
        if (source == blipbtn) then 
    local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) 
    local Blip = createBlipAttachedTo ( player, 22 ) 
        end 
end 
) 

Edited by Guest
Link to comment
blipbtn = guiCreateButton(22, 422, 110, 30, "setBlip", false, window) 
  
addEventHandler("onClientGUIClick", root, 
function (player) 
        if (source == blipbtn) and (source == Blip) then 
    local player = guiGridListGetItemText (playersgrid, guiGridListGetSelectedItem (playersgrid), 1) 
    local Blip = createBlipAttachedTo ( player, 22 ) 
    end 
end 
) 

Link to comment
local btBlip = guiCreateButton ( 22, 422, 110, 30, "setBlip", false, window ); 
  
addEventHandler ( "onClientGUIClick", root, 
    function() 
        if ( source == btBlip ) then 
            local p_Ele = getPlayerFromName ( guiGridListGetItemText ( playersgrid, guiGridListGetSelectedItem ( playersgrid ), 1 ) ); 
            if ( p_Ele ) then 
                local p_Blip = createBlipAttachedTo ( p_Ele, 56 ); 
            end 
        end 
    end 
) 

Make sure your gridlist with players list have their full names ( with color codes and everything else ), otherwise it won't work.

Link to comment
local btBlip = guiCreateButton ( 22, 422, 110, 30, "setBlip", false, window ); 
  
addEventHandler ( "onClientGUIClick", root, 
    function() 
        if ( source == btBlip ) then 
            local p_Ele = getPlayerFromName ( guiGridListGetItemText ( playersgrid, guiGridListGetSelectedItem ( playersgrid ), 1 ) ); 
            if ( p_Ele ) then 
                local p_Blip = createBlipAttachedTo ( p_Ele, 56 ); 
            end 
        end 
    end 
) 

Make sure your gridlist with players list have their full names ( with color codes and everything else ), otherwise it won't work.

Anderl I have a question why use(;)?Do you make it a difference?Or?Or?

Link to comment

You don't need to use it, I just like to use it. Also, I use it in many other languages so it's more like a habit ( just like the variable prefixes, which actually the ones I've been using weren't totally correct as this is not a programming language ). But this way I don't forget to use the ";" in the languages where it is really necessary.

Edited by Guest
Link to comment

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...