Ahmed Abo-elezz Posted November 22, 2014 Share Posted November 22, 2014 شباب انا عملت هذا الكود واريد تصحيحه المشكله انه عندما اضغط فى اى مكان فى الجريد ليست يأتى الى الشخصية 0 من فضلكم صححو لى هذا اريد الغاء الشخصية 0 لا تظهر ابدا MarkerPanalnag = createMarker(-1628.9000244141, -2247, 30.5, "cylinder", 1.5, 255, 255, 255, 0 ) createBlipAttachedTo ( MarkerPanalnag, 56 ) createObject ( 2387, -1628.9000244141, -2247, 30.5, 0, 0, 274 ) createObject ( 341, -1628.8000488281, -2246.1999511719, 30.39999961853, 20, 292, 0 ) GUIEditor = { gridlist = {}, button = {}, window = {}, } GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_gridlist = {} windowjob = guiCreateWindow(950, 300, 240, 437, "الخشاب", false) guiWindowSetSizable(windowjob, false) guiSetVisible(windowjob, false) GUIEditor_gridlist[1] = guiCreateGridList(21, 260, 200, 115, false, windowjob) guiGridListAddColumn(GUIEditor_gridlist[1], "رقم الخشصية", 0.5) guiGridListAddColumn(GUIEditor_gridlist[1], "اسم الشخصية", 0.5) for i = 1, 5 do guiGridListAddRow(GUIEditor_gridlist[1]) end guiGridListSetItemText(GUIEditor_gridlist[1], 0, 1, "79", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 0, 2, "خشاب 1", false, false) GUIEditor_Button[1] = guiCreateButton(21, 379, 130, 48, "الحصول على الوظيفة", false, windowjob) GUIEditor_Button[2] = guiCreateButton(155, 379, 66, 48, "الغاء", false, windowjob) --------------------------------------------------------------------------------- function joinTeamnag() triggerServerEvent("khashab",localPlayer) local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) if skin ~= 0 then guiSetVisible(windowjob, false) showCursor(false) setElementModel ( localPlayer, skin ) end end -------------------------------------------------------------------------- function SAPDjobnag(hitElement) setElementData ( localPlayer, "ownskin", getElementModel (localPlayer) ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end ------------------------------------------------------------------------------------- function setskintestnag() local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) setElementModel ( localPlayer, skin ) end ------------------------------------------------------------------------------------ function removeSAPDWindownag() guiSetVisible(windowjob, false) showCursor(false) setElementModel(localPlayer, getElementData(localPlayer, "ownskin")) end ------------------------------------------ ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- addEventHandler ( "onClientGUIClick", GUIEditor_gridlist[1], setskintestnag, false ) addEventHandler("onClientMarkerHit", MarkerPanalnag, SAPDjobnag) addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeamnag, false) addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindownag, false) addEventHandler("onClientMarkerLeave", marker, SAPDjobleavekhash) Link to comment
Ahmed Abo-elezz Posted November 22, 2014 Author Share Posted November 22, 2014 شخصية رقم كـم تبي ؟ انا اريد الشخصية رقم 79 فقط المشكله معى ان عند الضغط على المكان الاسود فى الجريد لست يظهر لى الشخرية رقم 0 Link to comment
EH10 Posted November 22, 2014 Share Posted November 22, 2014 , جـرب * - Client Side # MarkerPanalnag = createMarker(-1628.9000244141, -2247, 30.5, "cylinder", 1.5, 255, 255, 255, 0 ) createBlipAttachedTo ( MarkerPanalnag, 56 ) createObject ( 2387, -1628.9000244141, -2247, 30.5, 0, 0, 274 ) createObject ( 341, -1628.8000488281, -2246.1999511719, 30.39999961853, 20, 292, 0 ) Window = guiCreateWindow(311,145,228,305,"",false) guiSetVisible(Window, false) Gridlist = guiCreateGridList(9,25,210,227,false,Window) guiGridListSetSelectionMode(Gridlist,2) guiGridListAddColumn(Gridlist, "Number", 0.5) guiGridListAddColumn(Gridlist, "Skin", 0.5) Skin = guiCreateButton(65,255,95,19,"اخـتيار",false,Window) Close = guiCreateButton(81,275,66,26,"الـغـاء",false,Window) local Skins = { {'79', 79 } } for i, skin in ipairs( Skins ) do row = guiGridListAddRow(Gridlist) guiGridListSetItemText(Gridlist, row, 1, skin[1], false, false) guiGridListSetItemData(Gridlist, row, 1, skin[2]) end function joinTeamnag() if ( source == Skin ) then local Row, column = guiGridListGetSelectedItem ( Gridlist ) if ( Row and column and Row ~= -1 and column ~= -1 ) then local selct = tonumber( guiGridListGetItemData( Gridlist, guiGridListGetSelectedItem( Gridlist ) ) ) if selct and selct ~= '' then setElementModel ( localPlayer, selct ) triggerServerEvent("khashab",localPlayer) guiSetVisible(Window, false) showCursor(false) end end end end addEventHandler("onClientGUIClick", Skin , joinTeamnag, false) function SAPDjobnag(hitElement) setElementData ( localPlayer, "ownskin", getElementModel (localPlayer) ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(Window) then guiSetVisible(Window, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", MarkerPanalnag, SAPDjobnag) function removeSAPDWindownag() guiSetVisible(Window, false) showCursor(false) setElementModel(localPlayer, getElementData(localPlayer, "ownskin")) end addEventHandler("onClientGUIClick", Close , removeSAPDWindownag, false) Link to comment
Ahmed Abo-elezz Posted November 22, 2014 Author Share Posted November 22, 2014 , جـرب * - Client Side # MarkerPanalnag = createMarker(-1628.9000244141, -2247, 30.5, "cylinder", 1.5, 255, 255, 255, 0 ) createBlipAttachedTo ( MarkerPanalnag, 56 ) createObject ( 2387, -1628.9000244141, -2247, 30.5, 0, 0, 274 ) createObject ( 341, -1628.8000488281, -2246.1999511719, 30.39999961853, 20, 292, 0 ) Window = guiCreateWindow(311,145,228,305,"",false) guiSetVisible(Window, false) Gridlist = guiCreateGridList(9,25,210,227,false,Window) guiGridListSetSelectionMode(Gridlist,2) guiGridListAddColumn(Gridlist, "Number", 0.5) guiGridListAddColumn(Gridlist, "Skin", 0.5) Skin = guiCreateButton(65,255,95,19,"اخـتيار",false,Window) Close = guiCreateButton(81,275,66,26,"الـغـاء",false,Window) local Skins = { {'79', 79 } } for i, skin in ipairs( Skins ) do row = guiGridListAddRow(Gridlist) guiGridListSetItemText(Gridlist, row, 1, skin[1], false, false) guiGridListSetItemData(Gridlist, row, 1, skin[2]) end function joinTeamnag() if ( source == Skin ) then local Row, column = guiGridListGetSelectedItem ( Gridlist ) if ( Row and column and Row ~= -1 and column ~= -1 ) then local selct = tonumber( guiGridListGetItemData( Gridlist, guiGridListGetSelectedItem( Gridlist ) ) ) if selct and selct ~= '' then setElementModel ( localPlayer, selct ) triggerServerEvent("khashab",localPlayer) guiSetVisible(Window, false) showCursor(false) end end end end addEventHandler("onClientGUIClick", Skin , joinTeamnag, false) function SAPDjobnag(hitElement) setElementData ( localPlayer, "ownskin", getElementModel (localPlayer) ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(Window) then guiSetVisible(Window, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", MarkerPanalnag, SAPDjobnag) function removeSAPDWindownag() guiSetVisible(Window, false) showCursor(false) setElementModel(localPlayer, getElementData(localPlayer, "ownskin")) end addEventHandler("onClientGUIClick", Close , removeSAPDWindownag, false) متشكر جدا اخى Link to comment
jafar Posted November 22, 2014 Share Posted November 22, 2014 الشخصية راح تشاهدها انت فقط , بقية اللاعبين بتطلع عندهم الشخصية 0 استخدم ترايقر عشان يشوفونها جميع اللاعبين Link to comment
Ahmed Abo-elezz Posted November 22, 2014 Author Share Posted November 22, 2014 الشخصية راح تشاهدها انت فقط , بقية اللاعبين بتطلع عندهم الشخصية 0 استخدم ترايقر عشان يشوفونها جميع اللاعبين تشكر اخى 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