Jump to content

Brolis

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by Brolis

  1. Hello everyone, I am using this resource: local optimize = true -- Should the script be optimized? (if optimized, cannot be used client-side) local ids = {} function assignID() for i=1,getMaxPlayers() do if not ids[i] then ids[i] = source setElementData(source,"id",i,not optimize) break end end end addEventHandler("onPlayerJoin",root,assignID) function startup() for k, v in ipairs(getElementsByType("player")) do local id = getElementData(v,"id") if id then ids[id] = v end end end addEventHandler("onResourceStart",resourceRoot,startup) function getPlayerID(player) for k, v in ipairs(ids) do if v == player then return k end end end function freeID() local id = getElementData(source,"id") if not id then return end ids[id] = nil end addEventHandler("onPlayerQuit",root,freeID) function getPlayerByID(id) local player = ids[id] return player or false end But then I press TAB, there I can't see ids and player id or whatever, is here any player id system? I am using simple default scoreboard...
  2. Hi all again, today I wan't to fix this resource, when I join a game, this window automaticly popup, I wan't to make it hidden, just only if player press a key, it will be showing for that player, like me for me or other for other, I gess you guys know what I mean, default key is F9 - if you want to know I have already removed helpmanager, so no bugs with that, help me. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Radio = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(231,202,557,359,"SERVER TITLE GOES HERE",false) GUIEditor_Image[1] = guiCreateStaticImage(9,23,539,75,"logo.png",false,GUIEditor_Window[1]) GUIEditor_Radio[1] = guiCreateRadioButton(9,97,151,29,"INFO1",false,GUIEditor_Window[1]) GUIEditor_Radio[2] = guiCreateRadioButton(9,138,140,26,"INFO2",false,GUIEditor_Window[1]) GUIEditor_Radio[3] = guiCreateRadioButton(9,179,129,23,"INFO3",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(184,97,364,253,"TEXT GOES HERE1",false,GUIEditor_Window[1]) GUIEditor_Memo[2] = guiCreateMemo(184,97,364,253,"TEXT GOES HERE2",false,GUIEditor_Window[1]) GUIEditor_Memo[3] = guiCreateMemo(184,97,364,253,"TEXT GOES HERE3",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiMemoSetReadOnly(GUIEditor_Memo[2],true) guiMemoSetReadOnly(GUIEditor_Memo[3],true) guiMemoSetReadOnly(GUIEditor_Memo[4],true) guiMemoSetReadOnly(GUIEditor_Memo[5],true) GUIEditor_Button[1] = guiCreateButton(9,311,168,39,"Close",false,GUIEditor_Window[1]) function eta() if (source == GUIEditor_Radio[1]) then guiSetVisible ( GUIEditor_Memo[1], true ) guiSetVisible ( GUIEditor_Memo[2], false ) guiSetVisible ( GUIEditor_Memo[3], false ) elseif (source == GUIEditor_Radio[2]) then guiSetVisible ( GUIEditor_Memo[1], false ) guiSetVisible ( GUIEditor_Memo[2], true ) guiSetVisible ( GUIEditor_Memo[3], false ) elseif (source == GUIEditor_Radio[3]) then guiSetVisible ( GUIEditor_Memo[1], false ) guiSetVisible ( GUIEditor_Memo[2], false ) guiSetVisible ( GUIEditor_Memo[3], true ) end end addEventHandler("onClientGUIClick",GUIEditor_Radio[1],eta,false) addEventHandler("onClientGUIClick",GUIEditor_Radio[2],eta,false) addEventHandler("onClientGUIClick",GUIEditor_Radio[3],eta,false) function oppenz() if guiGetVisible ( GUIEditor_Window[1] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) guiSetInputEnabled(true) setTimer(glowbabyglow,6000,1) end end bindKey("F9","down",oppenz) function close() if (source == GUIEditor_Button[1]) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick",GUIEditor_Button[1],close,false) So, fix that someone, thanks a lot!
  3. safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 91, 127, 0, 100 ) -- 200 = alpha. setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if ( skin == 287 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have entered Area 69/51!", hitPlayer, 0, 255, 0) elseif ( skin == 285 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have entered Area 69/51!", hitPlayer, 0, 255, 0) elseif ( skin == 191 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have entered Area 69/51!", hitPlayer, 0, 255, 0) elseif ( skin == 192 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have entered Area 69/51!", hitPlayer, 0, 255, 0) elseif ( skin == 193 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have entered Area 69/51!", hitPlayer, 0, 255, 0) elseif ( skin == 294 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have entered Area 69/51!", hitPlayer, 0, 255, 0) else killPed (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) --outputChatBox("INFO: You have left Area 69/51!", hitPlayer, 255, 0, 0) if not ( skin == 287 ) then killPed (hitPlayer) outputChatBox("INFO: You are not allowed to enter Area 69/51!", hitPlayer, 240, 0, 0) elseif not ( skin == 285 ) then killPed (hitPlayer) outputChatBox("INFO: You are not allowed to enter Area 69/51!", hitPlayer, 240, 0, 0) elseif not ( skin == 191 ) then killPed (hitPlayer) outputChatBox("INFO: You are not allowed to enter Area 69/51!", hitPlayer, 240, 0, 0) elseif not ( skin == 192 ) then killPed (hitPlayer) outputChatBox("INFO: You are not allowed to enter Area 69/51!", hitPlayer, 240, 0, 0) elseif not ( skin == 193 ) then killPed (hitPlayer) outputChatBox("INFO: You are not allowed to enter Area 69/51!", hitPlayer, 240, 0, 0) elseif not ( skin == 294 ) then killPed (hitPlayer) outputChatBox("INFO: You are not allowed to enter Area 69/51!", hitPlayer, 240, 0, 0) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) I want that when I drive in that area with 287, 285, 193, 192, 191, 294 skin I will not die. Please fix this script, thanks.
  4. I have already have a map with placed vehicles, i just want to put these vehicles into my server.
  5. And I wan't to put vehicles from my map to server. Like Objects... But vehicles
  6. Hello again and again, now I wan't to ask you, to help me with h button or mouse2 script in vehicle. Simple: My friend is driving a car and i want to use shooting from a window of vehicle, where could I get, find that script, resource? I hope you got what I had in my mind. I would be very thanks'fuuuullll!
  7. Hello all again, now I wan't to ask you, and make question about: how to insert vehicles in my server from my map? Give me a files, meta, lua - if needed, conventer/url - if needed and something like that... Thanks
  8. Hello all, I wan't to ask someone of you to tell me where I could find "r button" reloading weapon bullet script/resource? Simple: M4 weapon, and ammo - 20-1006, I want to make it 50-976 by pressing r button... Help...
  9. Hello, first i just want to show us, what I wan't to know about: Is that? (x, y, z, r, g, b, - wheres alpha? I can't see ) safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) Is that? (x, y, ?, ?, ?, ?, ?, - wheres alpha, colors? I can't see ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 240, 0, 0 ) Tell me what means the last numbers... How to make alpha on radar area color? I tryed everything.
×
×
  • Create New...