Jump to content

SnoopCat

Members
  • Posts

    413
  • Joined

  • Last visited

Everything posted by SnoopCat

  1. SnoopCat

    Gm image

    its its client side but i dont know how to configure it i mean where is each part you gived..
  2. SnoopCat

    Gm image

    u mean this??? gmontext = get("gmontext") gmoncolor = get("gmoncolor") gmofftext = get("gmofftext") gmoffcolor = get("gmoffcolor") addEvent("onMapStarting") addEventHandler("onMapStarting", getRootElement(), function(mapInfo) if string.find(mapInfo.name, "[DM]", 1, true) or mapInfo.modename == "Sprint" then gmon() else gmoff() end end) function gmon() for theKey,thePlayer in ipairs(getElementsByType("player")) do x,y=guiGetScreenSize() localP=getLocalPlayer() addEventHandler("onClientRender",getRootElement(),function() dxDrawImage (x-100,y-100,80,80,getElementData(localP,"overrideCollide.uniqueblah") and "GMon.png") end) outputChatBox(gmoncolor..gmontext,thePlayer,186,212,71,true) end end function gmoff() for theKey,thePlayer in ipairs(getElementsByType("player")) do x,y=guiGetScreenSize() localP=getLocalPlayer() addEventHandler("onClientRender",getRootElement(),function() dxDrawImage (x-100,y-100,80,80,getElementData(localP,"overrideCollide.uniqueblah") and "GMoff.png") end) outputChatBox(gmoffcolor..gmofftext,thePlayer,255,255,255,true) end end u mena that???
  3. SnoopCat

    Gm image

    umm but that will show image when gm is on and when gm is off? plz give the example whit the whole script plz
  4. SnoopCat

    Gm image

    how to put the images give example plz
  5. SnoopCat

    Gm image

    i dont understant can u give an example?
  6. SnoopCat

    Gm image

    hey hello im here now because i have an autoghost mode for race gamemode and i want to put some images to see when the gm is on or when its off can u help me how to put the image functions? there is the code i want to add 2 images 1 must be showing when gm is on and if gm is off it must shows another one... can someone help me? gmontext = get("gmontext") gmoncolor = get("gmoncolor") gmofftext = get("gmofftext") gmoffcolor = get("gmoffcolor") addEvent("onMapStarting") addEventHandler("onMapStarting", getRootElement(), function(mapInfo) if string.find(mapInfo.name, "[DM]", 1, true) or mapInfo.modename == "Sprint" then gmon() else gmoff() end end) function gmon() for theKey,thePlayer in ipairs(getElementsByType("player")) do setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) outputChatBox(gmoncolor..gmontext,thePlayer,186,212,71,true) end end function gmoff() for theKey,thePlayer in ipairs(getElementsByType("player")) do setElementData(thePlayer, "overrideCollide.uniqueblah", nil, false ) outputChatBox(gmoffcolor..gmofftext,thePlayer,255,255,255,true) end end
  7. now the outputchatbox is working but i didnt get smoke on my car
  8. it doesnt let me login there and idk how i can do it
  9. hey hello this is a script i have and i want to put some smoke functions for the players to trow smoke into their cars... well i tried alot but is not working i hope u can help me... Server Side part: addEvent("premiumbuysmoke", true) addEventHandler("preiumbuysmoke", getRootElement(), function() if isPedInVehicle(source) then local targetPlayerName = getPlayerFromName ( source ) local x, y, z = getElementPosition( source ) local car = getPedOccupiedVehicle( source ) local ramp = createObject ( 2780, 0, 0, 0, true, 0 ) attachElements ( ramp, vehicle, 0.0, -5.255, 0, 0, 0, true, 45, 118 ) outputChatBox("*Premium: "..getPlayerName(source).." Ur Car Get Smoked!",getRootElement(),0,255,0) end end) and now Client Side part i made: elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("premiumbuysmoke", getLocalPlayer()) Note*: This is not all the scritp is just a part of it...
  10. Importants Bugs i Founded that must be fixed. all is working fine exept this: -when i load a Gui panel or something the Gui is not showing the tabs and databases are maybe not working.... -some Guis are unable to open... -in the Race Gamemode Maps somethimes Never loads and when them loads they have respawn... -somethimes the server drops you saying somethin like desync (5) tested whit (1.0.5) resourses.
  11. but we will be able to use same resourses as 1.0.X?
  12. wowowowow NICEEE this mta will support mta 1.0.* servers?
  13. thx cast is working
  14. hey i tried this can any one say me why is not working and where is error? Client: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(244,192,289,309,"Panel Miembros Que Pagan",false) guiSetVisible ( GUIEditor_Window[1], false ) GUIEditor_Button[1] = guiCreateButton(73,31,124,39,"Reparar Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(72,83,129,38,"Poner Bomba",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(71,140,124,39,"Obtener nitro",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(19,275,237,25,"cerrar [M]",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(11,199,266,17,"Todo En este panel No tiene Costo Para Ti.",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(64,220,166,43,"premium!",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0,0) guiSetFont(GUIEditor_Label[2],"sa-gothic") addEventHandler("onClientGUIClick",getRootElement(), function () if (source == GUIEditor_Button[4]) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) elseif (source == GUIEditor_Button[1]) then triggerServerEvent ("buyfix", getLocalPlayer()) elseif (source == GUIEditor_Button[3]) then triggerServerEvent ("buynitro", getLocalPlayer()) elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("buybomb", getLocalPlayer()) end end) addEvent("openPremiumPanel",true) addEventHandler("openPremiumPanel",getRootElement(), function () guiSetVisible (GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(not isCursorShowing()) end) Server: function showPremiumPanel(thePlayer) local account = getPlayerAccount(thePlayer) if account then local accountname = getAccountName(account) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "premium" )) then triggerClientEvent (thePlayer, "openPremiumPanel", getRootElement()) else outputChatBox ("Premium: Access denied", thePlayer, 255, 0, 0) end end end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), function () for index, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "M", "down", showPremiumPanel ) end end) addEventHandler ( "onPlayerJoin", getRootElement(), function () bindKey ( source, "M", "down", showPremiumPanel ) end) addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), function () for index, player in ipairs ( getElementsByType ( "player" ) ) do unbindKey ( player, "M", "down", showPremiumPanel ) end end) addEvent("buybomb", true) addEventHandler("buybomb", getRootElement(), function() if local x,y,z = getElementPosition( source ) setTimer(function()createObject ( 1225, x, y, z, 90, 0, 0 )end,3000,1) outputChatBox("*Poniendo Mina en 3 Segundos",source,0,255,0) outputChatBox("*Premium: "..getPlayerName(source).." a Tirado una Mina",getRootElement(),0,255,0) account = getPlayerAccount(source) end ) addEvent("buyfix", true) addEventHandler("buyfix", getRootElement(), function() if isPedInVehicle(source) then fixVehicle( getPedOccupiedVehicle(source) ) outputChatBox("*Premium: "..getPlayerName(source).." Se ha Reparado",getRootElement(),0,255,0) account = getPlayerAccount(source) end end ) addEvent("buynitro", true) addEventHandler("buynitro", getRootElement(), function() if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source),1010) outputChatBox("*Premium: "..getPlayerName(source).." Se Puso Nitro",getRootElement(),0,255,0) account = getPlayerAccount(source) end end )
  15. srry for double post butt... ANY help plz?
  16. well now i have to add functions to the gui like fixing car and droping barrel and get nitro For Free. there is the client part i tried to made but idk how to make the server side part Client side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(244,192,289,309,"Panel Miembros Que Pagan",false) guiSetVisible ( GUIEditor_Window[1], false ) GUIEditor_Button[1] = guiCreateButton(73,31,124,39,"Repair",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(72,83,129,38,"mine",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(71,140,124,39,"Get Nitro",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(19,275,237,25,"Close [M]",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(11,199,266,17,"Todo En este panel No tiene Costo Para Ti.",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(64,220,166,43,"premium!",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0,0) guiSetFont(GUIEditor_Label[2],"sa-gothic") addEventHandler("onClientGUIClick",getRootElement(), function () if (source == GUIEditor_Button[4]) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) end end) addEvent("openPremiumPanel",true) addEventHandler("openPremiumPanel",getRootElement(), function () guiSetVisible (GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(not isCursorShowing()) end) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ("buyfix", getLocalPlayer()) elseif (source == GUIEditor_Button[3]) then triggerServerEvent ("buynitro", getLocalPlayer()) elseif (source == GUIEditor_Button[2]) then triggerServerEvent ("buymine", getLocalPlayer()) Server side: function showPremiumPanel(thePlayer) local account = getPlayerAccount(thePlayer) if account then local accountname = getAccountName(account) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "premium" )) then triggerClientEvent (thePlayer, "openPremiumPanel", getRootElement()) else outputChatBox ("Premium: Access denied", thePlayer, 255, 0, 0) end end end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), function () for index, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "M", "down", showPremiumPanel ) end end) addEventHandler ( "onPlayerJoin", getRootElement(), function () bindKey ( source, "M", "down", showPremiumPanel ) end) addEventHandler ( "onResourceStop", getResourceRootElement ( getThisResource() ), function () for index, player in ipairs ( getElementsByType ( "player" ) ) do unbindKey ( player, "M", "down", showPremiumPanel ) end end)
  17. working fine thx solid
  18. it doest works solid it is giving me this error: [20:01:02] SCRIPT ERROR: Ppanel\GuiS.lua:17: 'end' expected (to close 'function' at line 14) near '<eof>' [20:01:02] WARNING: Loading script failed: Ppanel\GuiS.lua:17: 'end' expected (t o close 'function' at line 14) near '<eof>'
  19. gui is not opening at this time
  20. cow im having same problem as first try i see gui but i cant close it and it apears when i join the server and also i get an error saying : [09:55:45] SCRIPT ERROR: Ppanel\GuiS.lua:3: ')' expected near 'down' [09:55:45] WARNING: Loading script failed: Ppanel\GuiS.lua:3: ')' expected near 'down'
  21. that is not working it just shows the gui but u cant close it and the mouse is not showing
  22. hello i have a Gui that i want to make it open only for a specific Group in acl How i can do this??? there is the Gui code and also i tried to make it open whit M button but it doesnt work GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(244,192,289,309,"Panel Miembros Que Pagan",false) GUIEditor_Button[1] = guiCreateButton(73,31,124,39,"Repair",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(72,83,129,38,"Flip",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(71,140,124,39,"Get Nitro",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(19,275,237,25,"Close [M]",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(11,199,266,17,"Todo En este panel No tiene Costo Para Ti.",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(64,220,166,43,"premium!",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0,0) guiSetFont(GUIEditor_Label[2],"sa-gothic") bindKey("m", "down", function () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(not isCursorShowing()) end) addEventHandler("onClientGUIClick",getRootElement(), function () if (source == GUIEditor_Button[4]) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) end end
  23. Thart script work but when a map get started it get to the map default colors and i want to keep the colors of the script
  24. hey i have a skygradient and water color script but i want to make it changes to a random color every 5 mins how i can do this???? here is the cod ei have: addEventHandler("onClientResourceStop", getRootElement(), function() resetWaterColor() end) addEventHandler("onClientResourceStart", getRootElement(), function() setWaterColor(4, 140, 251) end) addEventHandler("onClientResourceStart", getRootElement(), function() setSkyGradient(255, 128, 0 , 0 , 0 , 0) end)
  25. any way of sharing it?
×
×
  • Create New...