Mark0 Posted February 12, 2013 Share Posted February 12, 2013 (edited) 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 February 12, 2013 by Guest Link to comment
K4stic Posted February 12, 2013 Share Posted February 12, 2013 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
Mark0 Posted February 12, 2013 Author Share Posted February 12, 2013 still the same !! Link to comment
K4stic Posted February 12, 2013 Share Posted February 12, 2013 is no attach the blip or just you see the error? Link to comment
K4stic Posted February 12, 2013 Share Posted February 12, 2013 (edited) 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 February 12, 2013 by Guest Link to comment
Mark0 Posted February 12, 2013 Author Share Posted February 12, 2013 now the Bad argument@'createBlipAttachedTo ' has been removed but there is no blip Link to comment
Mark0 Posted February 12, 2013 Author Share Posted February 12, 2013 no it's not work. Link to comment
K4stic Posted February 12, 2013 Share Posted February 12, 2013 (edited) 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 February 12, 2013 by Guest Link to comment
Mark0 Posted February 12, 2013 Author Share Posted February 12, 2013 No the Bad argument@'createBlipAttachedTo ' cames again Link to comment
K4stic Posted February 12, 2013 Share Posted February 12, 2013 (edited) it's make Blip attached? Edited February 12, 2013 by Guest Link to comment
K4stic Posted February 12, 2013 Share Posted February 12, 2013 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
Anderl Posted February 12, 2013 Share Posted February 12, 2013 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
iPrestege Posted February 12, 2013 Share Posted February 12, 2013 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
Anderl Posted February 12, 2013 Share Posted February 12, 2013 (edited) 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 February 12, 2013 by Guest Link to comment
iPrestege Posted February 12, 2013 Share Posted February 12, 2013 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 ). Ok,Thanks Just A Qus . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now