Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. That was not his question, I guess this is a part of his script. local ingang1 = createObject ( 980, -1907.9000244141, 2172.8999023438, 3.2000000476837, 0, 0, 0 ) local teams = {["AirForce"] = true, ["Army"] = true} function moveGate1 ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and getPlayerTeam ( hitElement ) and teams[getTeamName(getPlayerTeam ( hitElement ))] then moveObject ( ingang1, 3000, -1907.9000244141, 2172.8999023438, 9 ) end end addEventHandler("onMarkerHit", ingangmarker, moveGate1)
  2. You can't cancel this event, this would be highly stupid, why would you cancel him from quitting? you don't have enough players and you want to keep them even if they don't like the server? that's what I think.
  3. TAPL, I wanted him to learn from his errors, that's why I didn't gave him the script, now he'll just take yours and forget about it.
  4. I'm saying you just copyed my script and expected me to fix it for you, well, this time you'll have to find your bug and repair it.
  5. See? you did it again, you copyed and pasted what I written in the other post.. with this script you are fading off the camera of all players.
  6. function enableinput() triggerClientEvent(source,"afterlogin",getRootElement()) fadeCamera ( source, true, 1.0, 0, 0, 0 ) end addEventHandler("onPlayerLogin",getRootElement(),enableinput) function camerafade() --fadeCamera ( source, false, 1.0, 0, 0, 0 ) -- WTF is this? you think you can just copy one line and paste it and it'll work? for index, player in pairs(getElementsByType("player")) do fadeCamera ( player, false, 1.0, 0, 0, 0 ) end end addEventHandler("onResourceStart",resourceRoot,camerafade)
  7. Meh, was a REALLY simple mistake, o_O. You're welcome.
  8. Pretty easy script, a friend did it too, anyway, nice work .
  9. function enableinput() triggerClientEvent(source,"afterlogin",getRootElement()) -- You don't have such player argument 'client'. end addEventHandler("onPlayerLogin",getRootElement(),enableinput)
  10. Castillo

    GUI Error

    You also triggered it wrong. --THIS IS THE SERVER FILE function tag ( thePlayer, col, ta ) setElementData(thePlayer,"userr",col,ta) end addEvent( "tagg", true ) addEventHandler( "tagg", getRootElement(), tag) --THAT IS THE CLIENT FILE function tag(button, state) if (source == GUIEditor_Button[1]) then ta = guiGetText(GUIEditor_Edit[2]) col = guiGetText(GUIEditor_Edit[1]) tiggerServerEvent("tagg",localPlayer,localPlayer,col,ta) end end addEventHandler("onClientGUIClick",getRootElement(),tag)
  11. He's talking about freeroam, and you can bind it again, so unbind won't work. Soren: You want to disable it for everyone? if so, then stop the resource called "freeroam".
  12. That's pretty weird, is an admin chat or a kind of announcer? because you are sending the message to everyone. P.S: That "No" message is sent to all, can be abused to spam.
  13. Car mod: https://community.multitheftauto.com/index.php?p= ... ls&id=3018
  14. Castillo

    GUI Error

    What exactly did you change? because I see that you re-added water color event in server side, but never using it from client?
  15. Freeroam uploaded without any change: https://community.multitheftauto.com/index.php?p= ... ls&id=3021
  16. Map editor has this functions: -- XYZ euler rotation to YXZ euler rotation convertRotationToMTA(rx, ry, rz) -- YXZ rotation to XYZ rotation convertRotationFromMTA(rx, ry, rz) I don't know if that's what are you talking about.
  17. blip = {} marker = {} function poner () local x, y, z = getElementPosition (source) outputChatBox ("Marker y Blip Puestos", root, 255, 0, 0) local maxBlip = #blip -- con esto contas los contenidos de la tabla. local maxMarker = #marker blip[maxBlip + 1] = createBlip (x, y, z, 49) marker[maxMarker + 1] = createMarker (x, y, z, "checkpoint", 2, 135, 191, 255, 100) end function quitar () outputChatBox ("Marker y Blip Removido.", root, 255, 0, 0) for index, mkr in pairs(marker) do destroyElement(mkr) end for index, blp in pairs(blip) do destroyElement(blp) end end Para destruir todos los markers Y blips de la tabla tenes que hacer un loop.
  18. Castillo

    GUI Error

    I remember that something similar was happening in my c-panel, maybe is a MTA bug?
  19. function veh(thePlayer, cmd, modelid) local X = 5 local Y = 0 local Z = 0 local model = tonumber(modelid) if isObjectInACLGroup ("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Admin") ) then createVehicle (model, X, Y, Z) else outputChatBox ( "Admin cmd only!" ) end end addCommandHandler("veh", veh)
  20. Castillo

    GUI Error

    What do you mean? is not setting the color you select? try adding debug outputs to see if the values are the correct.
  21. Castillo

    Problems

    Could you explain me what are you trying to do?
  22. Castillo

    GUI Error

    Thank you, and you're welcome. P.S: I'm 16 years old, I have about 2 years learning I think.
  23. Castillo

    GUI Error

    --[[-- Script Made By Maria --]]-- -- 0º Part GUI GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(391,329,336,255,"Members Stuffs",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[15] = guiCreateButton(882,59,72,15,"CLOSE",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,24,318,222,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Stuffs",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(7,42,303,21,"Create Fire",false,GUIEditor_Tab[1]) FireS = guiCreateEdit(121,15,89,19,"2",false,GUIEditor_Tab[1]) guiEditSetMaxLength(FireS,2) GUIEditor_Label[1] = guiCreateLabel(14,16,99,17,"Fire Size: <1-15>",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(11,90,157,18,"Water Color: ",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],0,255,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(11,115,55,20,"255",false,GUIEditor_Tab[1]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Edit[2] = guiCreateEdit(160,115,55,20,"255",false,GUIEditor_Tab[1]) GUIEditor_Edit[3] = guiCreateEdit(86,115,55,20,"255",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(7,147,303,21,"Set Water Color",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Itens",GUIEditor_TabPanel[1]) GUIEditor_Label[3] = guiCreateLabel(9,9,123,17,"Strange Weapons:",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[3],0,255,255) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(11,31,83,17,"Flower",false,GUIEditor_Tab[2]) GUIEditor_Button[4] = guiCreateButton(119,31,83,17,"Dildo",false,GUIEditor_Tab[2]) GUIEditor_Button[5] = guiCreateButton(226,31,83,17,"Vibrator",false,GUIEditor_Tab[2]) GUIEditor_Button[6] = guiCreateButton(11,57,83,17,"Camera",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(119,57,83,17,"Night Vision",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(226,57,83,17,"Infra Vision",false,GUIEditor_Tab[2]) GUIEditor_Label[4] = guiCreateLabel(10,91,108,17,"Stuffs:",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Button[9] = guiCreateButton(11,115,83,17,"Shark",false,GUIEditor_Tab[2]) GUIEditor_Button[10] = guiCreateButton(119,115,83,17,"Turtle",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(226,115,83,17,"Love",false,GUIEditor_Tab[2]) GUIEditor_Button[12] = guiCreateButton(11,142,83,17,"Money",false,GUIEditor_Tab[2]) --GUIEditor_Button[13] = guiCreateButton(119,142,83,17,"Dolphin",false,GUIEditor_Tab[2]) --GUIEditor_Button[14] = guiCreateButton(226,142,83,17,"Submarine",false,GUIEditor_Tab[2]) -- 1º Part Buttons function firewater(button, state) if (source == GUIEditor_Button[1]) then nun = guiGetText(FireS) local x, y, z = getElementPosition(localPlayer) fi = createFire(x, y, z, nun) setTimer(destroyElement,10000,1,fi) elseif (source == GUIEditor_Button[2]) then r = guiGetText(GUIEditor_Edit[1]) if r == "" then return end g = guiGetText(GUIEditor_Edit[2]) if g == "" then return end b = guiGetText(GUIEditor_Edit[3]) if b == "" then return end triggerServerEvent("setWater",localPlayer,localPlayer,r,g,b) end end addEventHandler("onClientGUIClick",getRootElement(),firewater) -- 2º Part Buttons function wep(button, state) if (source == GUIEditor_Button[3]) then triggerServerEvent ( "flower", localPlayer, localPlayer) elseif (source == GUIEditor_Button[4]) then triggerServerEvent ( "dildo", localPlayer, localPlayer) elseif (source == GUIEditor_Button[5]) then triggerServerEvent ( "vibra", localPlayer, localPlayer) elseif (source == GUIEditor_Button[6]) then triggerServerEvent ( "came", localPlayer, localPlayer) elseif (source == GUIEditor_Button[7]) then triggerServerEvent ( "niv", localPlayer, localPlayer) elseif (source == GUIEditor_Button[8]) then triggerServerEvent ( "ifn", localPlayer, localPlayer) end end addEventHandler("onClientGUIClick",getRootElement(),wep) -- 3º Part Buttons function att(button, state) if (source == GUIEditor_Button[9]) then triggerServerEvent ( "sar", localPlayer, localPlayer) elseif (source == GUIEditor_Button[10]) then triggerServerEvent ( "tu", localPlayer, localPlayer) elseif (source == GUIEditor_Button[11]) then triggerServerEvent ( "love", localPlayer, localPlayer) elseif (source == GUIEditor_Button[12]) then triggerServerEvent ( "mo", localPlayer, localPlayer) end end addEventHandler("onClientGUIClick",getRootElement(),att) -- 4º Part Open function open() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end addEvent("opening",true) addEventHandler("opening",getRootElement(),open) -- 5º Part Close function close() if (source == GUIEditor_Button[15]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end addEventHandler("onClientGUIClick",getRootElement(),close) --[[-- Script Made By Maria --]]-- function flo ( source ) giveWeapon(source,14,1) outputChatBox("#ff0000* #ffffffYou get one #00ff00FLOWER#ffffff!",source,255,255,255,true) end addEvent( "flower", true ) addEventHandler( "flower", getRootElement(), flo ) function dil ( source ) giveWeapon(source,10,1) outputChatBox("#ff0000* #ffffffYou get one #00ff00DILDO#ffffff!",source,255,255,255,true) end addEvent( "dildo", true ) addEventHandler( "dildo", getRootElement(), dil ) function vib ( source ) giveWeapon(source,12,1) outputChatBox("#ff0000* #ffffffYou get one #00ff00VIBRATOR#ffffff!",source,255,255,255,true) end addEvent( "vibra", true ) addEventHandler( "vibra", getRootElement(), vib ) function cam ( source ) giveWeapon(source,43,10) outputChatBox("#ff0000* #ffffffYou get one #00ff00CAMERA#ffffff!",source,255,255,255,true) end addEvent( "came", true ) addEventHandler( "came", getRootElement(), cam ) function nv ( source ) giveWeapon(source,44,1) outputChatBox("#ff0000* #ffffffYou get one #00ff00NIGHT-VISION GOGGLES#ffffff!",source,255,255,255,true) end addEvent( "niv", true ) addEventHandler( "niv", getRootElement(), nv ) function en ( source ) giveWeapon(source,45,1) outputChatBox("#ff0000* #ffffffYou get one #00ff00INFRARED GOGGLES#ffffff!",source,255,255,255,true) end addEvent( "ifn", true ) addEventHandler( "ifn", getRootElement(), en) function shar ( source ) shark1 = createObject(1608,0,0,3) attachElements(shark1, source,0,0,0) setElementAlpha(source, 0) setTimer(destroyElement,60000,1,shark1) setTimer(setElementAlpha,60000,1,source,255) outputChatBox("#ff0000* #ffffffYou be a #00ff00SHARK#ffffff! (1 min)",source,255,255,255,true) end addEvent( "sar", true ) addEventHandler( "sar", getRootElement(), shar) function lov ( source ) love = createObject(1240,0,0,0) attachElements(love, source,0,0,1.5) setTimer(destroyElement,60000,1,love) outputChatBox("#ff0000* #ffffffYou get a #00ff00HEART#ffffff at your head! (1 min)",source,255,255,255,true) end addEvent( "love", true ) addEventHandler( "love", getRootElement(), lov) function mon ( source ) money = createObject(1550,0,0,3) attachElements(money, source,0,0,0) setElementAlpha(source, 0) setTimer(destroyElement,60000,1,money) setTimer(setElementAlpha,60000,1,source,255) outputChatBox("#ff0000* #ffffffYou be a #00ff00MONEY BAG#ffffff! (1 min)",source,255,255,255,true) end addEvent( "mo", true ) addEventHandler( "mo", getRootElement(), mon) function tur ( source ) turtl1 = createObject(1609,0,0,3) attachElements(turtl1, source,0,0,0) setElementAlpha(source, 0) setTimer(destroyElement,60000,1,turtl1) setTimer(setElementAlpha,60000,1,source,255) outputChatBox("#ff0000* #ffffffYou be a #00ff00TURTLE#ffffff! (1 min)",source,255,255,255,true) end addEvent( "tu", true ) addEventHandler( "tu", getRootElement(), tur) function open(source) if (getElementData(source, "userr") == "[bW]") then triggerClientEvent (source, "opening", getLocalPlayer()) else acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..acc, aclGetGroup("Admin")) then triggerClientEvent (source, "opening", source) else acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..acc, aclGetGroup("Moderator")) then triggerClientEvent (source, "opening", source) else acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..acc, aclGetGroup("HeadAdmin")) then triggerClientEvent (source, "opening", source) end end end end end addCommandHandler("codm",open) addEventHandler("onPlayerJoin",root, function () bindKey(source,"F6","down",open) end) addEventHandler("onResourceStart",resourceRoot, function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"F6","down",open) end end) addEvent("setWater",true) addEventHandler("setWater",root, function (client, r, g, b) if r and g and b then setWaterColor(tonumber(r),tonumber(g),tonumber(b),255) end end) Not sure if it'll work.
  24. That's because setVehicleHandling is a SERVER ONLY function and onClientVehicleRespawn is CLIENT SIDE. function resetVehicleHandling() local h = getOriginalHandling(getElementModel(source)) for k,val in pairs(h) do setVehicleHandling(source, k, val) end end addEventHandler("onVehicleRespawn", getRootElement(), resetVehicleHandling)
×
×
  • Create New...