Advertisement
Guest User

برمجة سيارة المقر

a guest
Jul 23rd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. local window = guiCreateWindow(353, 146, 323, 358, "Cars Group", false)
  2. guiWindowSetSizable(window, false)
  3. guiSetVisible (window,false)
  4. guiSetAlpha(window, 1.00)
  5.  
  6. local gridlist = guiCreateGridList(33, 46, 256, 253, false, window)
  7. guiGridListAddColumn(gridlist, "Car", 0.9)
  8. local button2 = guiCreateButton(29, 311, 68, 35, "Use", false, window)
  9. guiSetProperty(button2, "NormalTextColour", "ffff0000")
  10. local button = guiCreateButton(288, 25, 26, 22, "X", false, window)
  11. guiSetProperty(button, "NormalTextColour", "FFFF0000")
  12. local car = { 470 , 433, 415, 541, 411, 560, 451, 480, 579, 565, 568, 581, 521, 461, 468 }
  13.  
  14. for _,vehicle in ipairs (car) do
  15. local row = guiGridListAddRow ( gridlist )
  16. guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false )
  17. end
  18.  
  19. addEventHandler("onClientGUIClick",button2,
  20. function ()
  21. local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 )
  22. if carxx == "" then return outputChatBox("Plese Use Car",255, 0, 0,false) end
  23. triggerServerEvent("carx",localPlayer,carxx)
  24. guiSetVisible(window,false)
  25. showCursor(false)
  26. end,false
  27. )
  28.  
  29.  
  30. ------------
  31.  
  32.  
  33. local car = createMarker ( 50.099998474121,297.79998779297,-36.599998474121, "cylinder", 2, 57, 0, 0, 255 )
  34. addEventHandler('onClientMarkerHit', car,
  35. function ( hitPlayer )
  36. if ( hitPlayer == localPlayer ) and getPlayerTeam( hitPlayer ) and getTeamName( getPlayerTeam( hitPlayer ) ) == 'Police' and getElementData( hitPlayer, 'Group' ) == '[ARMY]' then
  37. guiSetVisible ( window ,true )
  38. showCursor( true )
  39. guiSetInputEnabled(false)
  40. end
  41. end
  42. )
  43.  
  44. addEventHandler( "onClientGUIClick", button ,
  45. function ()
  46. guiSetVisible(window,false)
  47. showCursor(false,false)
  48. end
  49. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement