Jump to content

SoMoRay

Members
  • Posts

    169
  • Joined

  • Last visited

Everything posted by SoMoRay

  1. server side ! local lp = getLocalPlayer() addEvent("ip", true) addEventHandler("ip", root, function() guiSetText(GUIEditor.label[9],"" ..getPlayerIP(lp).. "") end) Client side ! triggerServerEvent("ip",getLocalPlayer()) صح او غلط؟
  2. ممكن كود ip + serial + health الي هو الدم armor الي هو الدرع حق لوحة انا سويت اليبل بس ماعرفت اسويها
  3. hi guys I want a code for player ip + serial + health + Armor for panel and I want the panel get these thing in the label I do it Your Health Your Armor Your .......
  4. how I do it ? event "onPlayerWasted" triggerClientEvent -------------------------- event "onPlayerJoin" triggerClientEvent
  5. no one can help me ?
  6. sorry i forget put him this is a client side ! x, y = guiGetScreenSize ( ) function centerWindow ( center_window, k, v ) local screenW, screenH = guiGetScreenSize ( ) local windowW, windowH = guiGetSize ( center_window, false ) local x, y = ( screenW - windowW ) / v, ( screenH - windowH )/k guiSetPosition ( center_window, x, y, false ) end thePed = createPed ( 1, 0, 0, 500, 90 ) setElementFrozen ( thePed, true ) setCameraMatrix ( -3.6658203125, 0, 500.48254455566, 2906.9938964844, 0, 201.84664916992 ) Animations = { "dnce_M_b"} setPedAnimation( thePed, "DANCING", Animations [ math.random ( #Animations ) ] ) theObject = createObject ( 1337, 0, 0, 499, 60 ) setElementAlpha ( theObject, 0 ) SpawnBtn = guiCreateButton( 0, 0, 125, 62.5, "Spawn", false ) centerWindow ( SpawnBtn, 1.2, 1.96 ) RightBtn = guiCreateButton( 0, 0, 70, 35, ">", false ) centerWindow ( RightBtn, 2, 1.4 ) LeftBtn = guiCreateButton( 0, 0, 70, 35, "<", false ) centerWindow ( LeftBtn, 2, 3.3 ) showCursor ( true ) function Right ( ) if ( isElement ( thePed ) ) then if ( getElementModel ( thePed ) ~= 280 ) then setElementModel ( thePed, 280 ) else setElementModel ( thePed, 1 ) end end end function Left ( ) if ( isElement ( thePed ) ) then if ( getElementModel ( thePed ) ~= 1 ) then setElementModel ( thePed, 1 ) else setElementModel ( thePed, 280 ) end end end addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == SpawnBtn ) then triggerServerEvent ( "spawnPed", localPlayer, getElementModel ( thePed ) ) if isElement ( thePed ) then destroyElement ( thePed ) end if isElement ( theObject ) then destroyElement ( theObject ) end destroyElement ( SpawnBtn ) destroyElement ( RightBtn ) destroyElement ( LeftBtn ) stopSound(sound) sound = nil showCursor ( false ) elseif ( source == RightBtn ) then Right ( ) elseif ( source == LeftBtn ) then Left ( ) end end )
  7. there proplem with this script if player join server see what he got but when he in the server and I restart the mode we got like this ...........
  8. ok all think now fixed but the spawn mode he is did't work cameraMatrix when player join server did't take the ped fly + the sound did't play and I want when player wasted the spawn mode open for him to take team
  9. also still he tell me like the picture in up
  10. still same proplem did't fixed this is the meta
  11. what proplem I put ur code for play sound he kick me from server and said wrong code Download error: Error downloading requested files. HTTP response code said error. [The requested URL returned error: 404] [spawn@00/Client.lua] Client Side ! x, y = guiGetScreenSize ( ) function centerWindow ( center_window, k, v ) local screenW, screenH = guiGetScreenSize ( ) local windowW, windowH = guiGetSize ( center_window, false ) local x, y = ( screenW - windowW ) / v, ( screenH - windowH )/k guiSetPosition ( center_window, x, y, false ) end addEventHandler("onClientResourceStart",resourceRoot, function () sound = playSound("Alhajarii.mp3",true) end) thePed = createPed ( 1, 0, 0, 500, 90 ) setElementFrozen ( thePed, true ) setCameraMatrix ( -3.6658203125, 0, 500.48254455566, 2906.9938964844, 0, 201.84664916992 ) Animations = { "dnce_M_b"} setPedAnimation( thePed, "DANCING", Animations [ math.random ( #Animations ) ] ) theObject = createObject ( 1337, 0, 0, 499, 60 ) setElementAlpha ( theObject, 0 ) SpawnBtn = guiCreateButton( 0, 0, 125, 62.5, "Spawn", false ) centerWindow ( SpawnBtn, 1.2, 1.96 ) RightBtn = guiCreateButton( 0, 0, 70, 35, ">", false ) centerWindow ( RightBtn, 2, 1.4 ) LeftBtn = guiCreateButton( 0, 0, 70, 35, "<", false ) centerWindow ( LeftBtn, 2, 3.3 ) showCursor ( true ) function Right ( ) if ( isElement ( thePed ) ) then if ( getElementModel ( thePed ) ~= 280 ) then setElementModel ( thePed, 280 ) else setElementModel ( thePed, 1 ) end end end function Left ( ) if ( isElement ( thePed ) ) then if ( getElementModel ( thePed ) ~= 1 ) then setElementModel ( thePed, 1 ) else setElementModel ( thePed, 280 ) end end end addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == SpawnBtn ) then triggerServerEvent ( "spawnPed", localPlayer, getElementModel ( thePed ) ) if isElement ( thePed ) then destroyElement ( thePed ) end if isElement ( theObject ) then destroyElement ( theObject ) end destroyElement ( SpawnBtn ) destroyElement ( RightBtn ) destroyElement ( LeftBtn ) showCursor ( false ) elseif ( source == RightBtn ) then Right ( ) elseif ( source == LeftBtn ) then Left ( ) end end
  12. how I make playSound when resource start + when they click Spawn the sound stop
  13. طرحته خاص + TDMA
  14. thanx ! how to make him take from map the team in the map and spawn with the map x, y , z
  15. شلون اخليه يختار تيم مالين المابات يعني مثل مال احمد في مساهمات
  16. hi guys I do spawn but there proplem see the picture I can't change team with I click in arrow right and arrow left this is Client GUIEditor = { button = {}, } spawn = guiCreateButton(583, 690, 191, 58, "Spawn", false) guiSetFont(GUIEditor.button[1], "clear-normal") addEventHandler("onClientGUIClick",spawn, function () triggerServerEvent("setTeam",localPlayer) end) addEventHandler("onClientGUIClick",spawn, function () triggerServerEvent("setTeam2",localPlayer) end) Server Team = createTeam ("Rebel",255,0,0) addEvent("setTeam",true) addEventHandler("setTeam",root, function (theplayer1) bindKey("arrow_r", "down",theplayer1) setCameraMatrix( theplayer, 1568.5963134766, -1691.4530029297, 5.890625) setPlayerTeam(source,Team) spawnPlayer (source, 1568.5963134766, -1691.4530029297, 5.890625,0,1,0,1,Team) Anims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"} setPedAnimation( ped, "DANCING", Anims[math.random(1,4)]) ped = createPed (1,1568.5963134766,-1691.4530029297,5.890625) pedSkin = getElementModel(ped) setElementModel(ped,id) giveWeapon ( source, 30, 9999,true ) giveWeapon ( source, 31, 9999,true ) setTeamFriendlyFire ( getTeamFromName("Rebel"),false) outputChatBox ( "#FF0000 You Take Rebel Team !", 255, 255, 255, true ) end ) Team2 = createTeam ("Police",255,0,0) addEvent("setTeam2",true) addEventHandler("setTeam2",root, function (theplayer2) bindKey("arrow_l", "down",theplayer2) setCameraMatrix( theplayer, 1485.0311279297, -2234.9086914063, 13.546875) Anims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"} setPedAnimation( ped, "DANCING", Anims[math.random(1,4)]) ped = createPed (280, 1485.0311279297, -2234.9086914063, 13.546875) pedSkin = getElementModel(ped) setElementModel(ped,id) spawnPlayer (source, 1485.0311279297, -2234.9086914063, 13.546875,0,280,0,0,Team2) giveWeapon ( source, 30, 9999,true ) giveWeapon ( source, 31, 9999,true ) setTeamFriendlyFire ( getTeamFromName("Police"),false) outputChatBox ( "#FF0000 You Take Police Team !", 255, 255, 255, true ) end )
  17. setCameraMatrix( theplayer, x, y, z) ?
  18. setCameraMatrix شلون اسويها ؟
  19. على فكرة رقم 1 مهوب شخصية سي جي ، رقم شخصية سي جي هو 0 .. ؟ يب ادري انا ابي 1
  20. بزر احداثيات فريق Police Ak47 -- 9999 TearGas --9999 x = 1568.5963134766 y = -1691.4530029297 z = 5.890625 --------------------------------- Peaple M4 -- 9999 MP5 -- 9999 x = 1485.0311279297 y = -2234.9086914063 z = 13.546875 طيب شخصيات كل تيم وش هي ؟ Police 280 Peaple 1
  21. بزر احداثيات فريق Police Ak47 -- 9999 TearGas --9999 x = 1568.5963134766 y = -1691.4530029297 z = 5.890625 --------------------------------- Peaple M4 -- 9999 MP5 -- 9999 x = 1485.0311279297 y = -2234.9086914063 z = 13.546875
×
×
  • Create New...