Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. giveWeapon it server side not client
  2. Dimos7

    Not Work

    he can remove the player and place the source its the same think
  3. Dimos7

    Not Work

    function onPlayerSoawnHandler(player) local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return end if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then setPlayerArmor(player, 100) end end addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler)
  4. function Armor() if getElementData(source, "class") == Heavy then setPlayerArmor(source, 100) end end addEventHandler("onPlayerSpawn", root, Armor)
  5. you need use and takePlayerMoney
  6. Server: local radararea = createRadarArea(1338.5789794922, -1753.3083496094, 200, 200, 255, 0, 0) local col = createColRectangle(1338.5789794922, -1753.3083496094, 100, 200) function sa() setElementAlpha(radararea, 100) end addEventHandler("onResourceStart", root, sa) function areaEnter(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then setRadarAreaFlashing(radararea, true) triggerClientEvent(thePlayer, "colHit", thePlayer) end end addEventHandler("onColShapeHit", getRootElement(), areaEnter) function areaExit(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then if isPedDead(thePlayer) ~= true then setRadarAreaFlashing(radararea, false) triggerClientEvent(thePlayer, "colLeave", thePlayer) end end end addEventHandler("onColShapeLeave", getRootElement(), areaExit) Client: function Draw() dxDrawText("You have entered the red zone. A hidden package (Gunbox) can be found here.", 378, 594, 1055, 680, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end addEvent("colHit", true) addEventHandler("colHit", root, function() addEventHandler("onClientRender", root, Draw) end ) addEvent("colLeave", true) addEventHandler("colLeave", root, function() removeEventHandler("onClientRender", root, Draw) end )
  7. function draw() dxDrawText("You have entered the red zone. A hidden package (Gunbox) can be found here.", 378, 594, 1055, 680, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end addEvent("colHit", true) addEventHandler("colHit", root, draw) addEventHandler("onClientRender", root, draw)
  8. Dimos7

    HUD

    function hide() showPlayerHudComponent("all", false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), hide) addEventHandler("onClientPlayerJoin", getRootElement(), hide) or try server side function hide() showPlayerHudComponent(source, "all", false) end addEventHandler("onResourceStart" , getResourceRootElement(getThisResource()), hide) addEventHandler("onPlayerJoin", getRootElement(), hide) function show() showPlayerHudComponent(source, "all", true) end addEventHandler("onPlayerLogin", getRootElement(), show)
  9. Dimos7

    HUD

    addEventHandler("onClientPlayerJoin", getRootElement(), function() showPlayerHudComponent("all", false) end)
  10. Dimos7

    Script help

    try to exctract them
  11. the dafaul i put it as adminredo
  12. local hexColor = string.format("#%, 2X%, 2X%, 2X", r, g , b)
  13. modshopls1 = createMarker(1041.5,-1021.5,31,"cylinder",3.5,250,0,0,100,getRootElement ()) Blipmodshopls1 = createBlipAttachedTo(modshopls1, 27) setBlipVisibleDistance (Blipmodshopls1, 300) function Panel() modshop = guiCreateWindow(1230, 285, 323, 433, "modshop", false) guiWindowSetSizable(modshop, false) Nitrox2 = guiCreateButton(20, 38, 134, 43, "Nitrox2", false, modshop) Nitrox5 = guiCreateButton(20, 100, 134, 43, "Nitrox5", false, modshop) Nitrox10 = guiCreateButton(20, 163, 134, 43, "Nitrox10", false, modshop) Exit = guiCreateButton(66, 375, 193, 48, "Exit", false, modshop) showCursor ( true ) addEventHandler ( "onClientGUIClick", Exit, Close, false ) addEventHandler ( "onClientGUIClick", Nitrox2, Nitroxx2, false ) addEventHandler ( "onClientGUIClick", Nitrox5, Nitroxx5, false ) addEventHandler ( "onClientGUIClick", Nitrox10, Nitroxx10, false ) end addEventHandler ( "onClientMarkerHit", modshopls1, Panel ) if isPedInVehicle(getLocalPlayer()) == true then Panel() else Close() outputChatBox("You aren't in a vehicle", 255, 0, 0) end function Close() guiSetVisible (modshop, false ) showCursor ( false ) end function Nitroxx2() triggerServerEvent ( "onNitroxxx2", getLocalPlayer() ) end function Nitroxx5() triggerServerEvent ( "onNitroxxx5", getLocalPlayer() ) end function Nitroxx10() triggerServerEvent ( "onNitroxxx10", getLocalPlayer() ) end
  14. you mean like r, g, b = 000000?
  15. modshopls1 = createMarker(1041.5,-1021.5,31,"cylinder",3.5,250,0,0,100,getRootElement ()) Blipmodshopls1 = createBlipAttachedTo(modshopls1, 27) setBlipVisibleDistance (Blipmodshopls1, 300) function Panel() modshop = guiCreateWindow(1230, 285, 323, 433, "modshop", false) guiWindowSetSizable(modshop, false) Nitrox2 = guiCreateButton(20, 38, 134, 43, "Nitrox2", false, modshop) Nitrox5 = guiCreateButton(20, 100, 134, 43, "Nitrox5", false, modshop) Nitrox10 = guiCreateButton(20, 163, 134, 43, "Nitrox10", false, modshop) Exit = guiCreateButton(66, 375, 193, 48, "Exit", false, modshop) showCursor ( true ) addEventHandler ( "onClientGUIClick", Exit, Close, false ) addEventHandler ( "onClientGUIClick", Nitrox2, Nitroxx2, false ) addEventHandler ( "onClientGUIClick", Nitrox5, Nitroxx5, false ) addEventHandler ( "onClientGUIClick", Nitrox10, Nitroxx10, false ) end addEventHandler ( "onClientMarkerHit", modshopls1, Panel ) if isPedInVehicle(getLocalPlayer()) == true then Panel() end function Close() guiSetVisible (modshop, false ) showCursor ( false ) end function Nitroxx2() triggerServerEvent ( "onNitroxxx2", getLocalPlayer() ) end function Nitroxx5() triggerServerEvent ( "onNitroxxx5", getLocalPlayer() ) end function Nitroxx10() triggerServerEvent ( "onNitroxxx10", getLocalPlayer() ) end
  16. Dimos7

    I need help

    How can i do that when player join the camera going arround a city for example los santos?
  17. modshopls1 = createMarker(1041.5,-1021.5,31,"cylinder",3.5,250,0,0,100,getRootElement ()) Blipmodshopls1 = createBlipAttachedTo(modshopls1, 27) setBlipVisibleDistance (Blipmodshopls1, 300) function Panel() modshop = guiCreateWindow(1230, 285, 323, 433, "modshop", false) guiWindowSetSizable(modshop, false) Nitrox2 = guiCreateButton(20, 38, 134, 43, "Nitrox2", false, modshop) Nitrox5 = guiCreateButton(20, 100, 134, 43, "Nitrox5", false, modshop) Nitrox10 = guiCreateButton(20, 163, 134, 43, "Nitrox10", false, modshop) Exit = guiCreateButton(66, 375, 193, 48, "Exit", false, modshop) showCursor ( true ) guiSetVisible(modshop, true) addEventHandler ( "onClientGUIClick", Exit, Close, false ) addEventHandler ( "onClientGUIClick", Nitrox2, Nitroxx2, false ) addEventHandler ( "onClientGUIClick", Nitrox5, Nitroxx5, false ) addEventHandler ( "onClientGUIClick", Nitrox10, Nitroxx10, false ) end addEventHandler ( "onClientMarkerHit", modshopls1, Panel ) function Close() guiSetVisible (modshop, false ) showCursor ( false ) end function Nitroxx2() triggerServerEvent ( "onNitroxxx2", getLocalPlayer() ) end function Nitroxx5() triggerServerEvent ( "onNitroxxx5", getLocalPlayer() ) end function Nitroxx10() triggerServerEvent ( "onNitroxxx10", getLocalPlayer() ) end
  18. function respawn() for k, v in ipairs(getElementsByType("player") do local team = getPlayerTeam(v) local health = getElementHealth(v) if team then if (getTeamName(team) == "Assasin" ) and health < 0 then spawnPlayer(source, 0, 0, 5, 0, math.random(0, 288), 0, 0) setPlayerTeam(source, team) giveWeapon(source, 8, 1) giveWeapon(source, 1, 1) elseif (getTeamName(team) == "Gunner") then spawnPlayer(source, 0, 0, 5, 0 , math.random(0, 288), 0, 0) setPlayerTeam(source, team) end end end end addEventHandler("onResourceStart", root, respawn)
  19. function respawn(player) local team = getPlayerTeam(player) local health = getElementHealth(player) if team then if (getTeamName(team) == "Assasin") and health <0 then spawnPlayer(source, 0, 0, 5, 0, math.random(0, 288), 0, 0, spawnTeam) outputChatBox("Bạn đã được respawn", source, 255, 0, 0) giveWeapon(source, 8, 1) giveWeapon(source, 1, 1) elseif (getTeamName(team) == "Gunner") then spawnPlayer(source, 0, 0, 5, 0, math.random(0, 288), 0 , 0, spawnTeam) outputChatBox("Bạn đã được respawn", source, 255, 0, 0) end end end addEventHandler("onResourceStart", root, respawn)
  20. /debugscript 3 test it and write the error please
×
×
  • Create New...