sckatchof Posted February 18, 2012 Share Posted February 18, 2012 hi guys i have problem in this lien x,y,z = getElementPosition ( getPlayerFromName(playername) ) function MarkPlayer(thePlayer,cmd,playername) x,y,z = getElementPosition ( getPlayerFromName(playername) ) local blip = createBlip (x, y, z, 41, 4, 255, 0, 0,255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) end addEvent("orten", true) addEventHandler("orten", getRootElement(), MarkPlayer) Link to comment
Castillo Posted February 18, 2012 Share Posted February 18, 2012 function MarkPlayer(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local x,y,z = getElementPosition ( player ) local blip = createBlip (x, y, z, 41, 4, 255, 0, 0,255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), MarkPlayer) Link to comment
sckatchof Posted February 18, 2012 Author Share Posted February 18, 2012 (edited) function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local x,y,z = getElementPosition ( player ) local blip = createBlip (x, y, z, 41, 4, 255, 0, 0,255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) thnx snake but when i select player from the gui i want to mark him in my police compture i cants find any player lit show like this msg Player not found this is the part from client side .... p_column = guiGridListAddColumn( CopComputer_Grid[1], "player", 0.70 ) w_column = guiGridListAddColumn( CopComputer_Grid[1], "Wanteds", 0.20) guiGridListSetSelectionMode(CopComputer_Grid[1],1) CopComputer_Button[3] = guiCreateButton(43,365,108,35,"locate",false,CopComputer_Window[1]) ..... function btn3() local rowindex, columnindex = guiGridListGetSelectedItem ( CopComputer_Grid[1] ) playername = guiGridListGetItemText ( CopComputer_Grid[1], rowindex, 1) triggerServerEvent("orten", getRootElement(), getLocalPlayer(),"orten", playername) setTimer(refreshcopcomp,1000,1) end i want when i select player it show blip attach to the player in radar Edited February 18, 2012 by Guest Link to comment
Castillo Posted February 18, 2012 Share Posted February 18, 2012 .... p_column = guiGridListAddColumn( CopComputer_Grid[1], "player", 0.70 ) w_column = guiGridListAddColumn( CopComputer_Grid[1], "Wanteds", 0.20) guiGridListSetSelectionMode(CopComputer_Grid[1],1) CopComputer_Button[3] = guiCreateButton(43,365,108,35,"locate",false,CopComputer_Window[1]) ..... function btn3() local rowindex, columnindex = guiGridListGetSelectedItem ( CopComputer_Grid[1] ) local playername = guiGridListGetItemText ( CopComputer_Grid[1], rowindex, 1) triggerServerEvent("orten", getRootElement(), getLocalPlayer(), playername) setTimer(refreshcopcomp,1000,1) end Link to comment
sckatchof Posted February 18, 2012 Author Share Posted February 18, 2012 .... p_column = guiGridListAddColumn( CopComputer_Grid[1], "player", 0.70 ) w_column = guiGridListAddColumn( CopComputer_Grid[1], "Wanteds", 0.20) guiGridListSetSelectionMode(CopComputer_Grid[1],1) CopComputer_Button[3] = guiCreateButton(43,365,108,35,"locate",false,CopComputer_Window[1]) ..... function btn3() local rowindex, columnindex = guiGridListGetSelectedItem ( CopComputer_Grid[1] ) local playername = guiGridListGetItemText ( CopComputer_Grid[1], rowindex, 1) triggerServerEvent("orten", getRootElement(), getLocalPlayer(), playername) setTimer(refreshcopcomp,1000,1) end thank yooou snake it's work but how can i attach the blip in player function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local x,y,z = getElementPosition ( player ) local blip = createBlip (x, y, z, 41, 4, 255, 0, 0,255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten) Link to comment
Castillo Posted February 18, 2012 Share Posted February 18, 2012 function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local blip = createBlipAttachedTo (player, 41, 4, 255, 0, 0, 255, 0, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten) Link to comment
sckatchof Posted February 18, 2012 Author Share Posted February 18, 2012 function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local blip = createBlipAttachedTo (player, 41, 4, 255, 0, 0, 255, 0, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten) thnaks snake but it dont work Link to comment
Castillo Posted February 18, 2012 Share Posted February 18, 2012 function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local blip = createBlipAttachedTo (player, 41, 4, 255, 0, 0, 255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten) Link to comment
sckatchof Posted February 18, 2012 Author Share Posted February 18, 2012 function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local blip = createBlipAttachedTo (player, 41, 4, 255, 0, 0, 255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten) thank yooooou snake for ur help. 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