-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
local guiadminwindow local SlapB function AdminPanel(key, keyState) guiadminwindow = guiCreateWindow(336,76,824,721,"Admin Panel",false) guiadminlabel = guiCreateLabel(424,28,344,60,"Admin Commands",false,guiadminwindow) SlapB = guiCreateButton(433,98,91,20,"Slap",false,guiadminwindow) addEventHandler("onClientGUIClick", SlapB, Slap, false) end
-
Rcon? this is only on SA-MP. In mta you can set server password by exiting mtaserver.conf or you can change server password with the admin panel.
-
How to set that you download a resource before the other?
Castillo replied to xXNemesiSXx's topic in Scripting
About the resources part, i have no idea, i think it is impossible. -
hospitalsTable = { { 1177.7994384766, -1323.0667724609, 14.088536262512 }, { -2656.2421875, 635.99420166016, 14.453125 }, { 1607.1225585938, 1817.8732910156, 10.8203125 }, } function findNearestHostpital(thePlayer) local nearest = nil local min = 999999 for key,val in pairs(hospitalsTable) do local xx,yy,zz=getElementPosition(thePlayer) local x1=val[1] local y1=val[2] local z1=val[3] local dist = getDistanceBetweenPoints2D(xx,yy,x1,y1) if distthen nearest = val min = dist end end return nearest[1],nearest[2],nearest[3] end function spawn(player) local xx,yy,zz = findNearestHostpital(player) spawnPlayer( player, xx,yy,zz) fadeCamera(player,true,3.0) end addEventHandler("onPlayerWasted", root, function() fadeCamera(source,false,6.0,0,0,0) setTimer(spawn, 8000, 1, source) end )
-
It means these servers aren't online, or you have problems with your internet connection.
-
jaja, no hay problema
-
Mi opinon? lo arruinaste.
-
Well, you could try playing a different type of server (maybe?) There are some RP servers (not fully RP like vG or Vedic or any other) Names: CIT CnR/RP Project |cit-project.net: 94.23.153.11:22003 SANL:RPG | sanlrpg.net: 91.121.28.212:22003
-
No, so far, there isn't, you could search for another RP server instead of waiting for them to unban you.
-
Well, in some servers you can donate X amount of money, and they will un-ban you (I don't know if vG does this).
-
enabled = true GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(150,185,457,363,"Gui De Sonidos",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(21,32,99,35,"Fail",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(19,79,102,34,"ayuwoki",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(20,130,100,33,"Hola",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(18,177,100,34,"Cuack",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(19,219,100,34,"Mario",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(21,261,100,34,"Disco",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(133,32,100,34,"Membrillo",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(134,79,100,34,"aweonao",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(133,128,100,34,"vacio",false,GUIEditor_Window[1]) GUIEditor_Button[10] = guiCreateButton(133,178,100,34,"vacio",false,GUIEditor_Window[1]) GUIEditor_Button[11] = guiCreateButton(131,226,100,34,"vacio",false,GUIEditor_Window[1]) GUIEditor_Button[12] = guiCreateButton(131,270,100,34,"vacio",false,GUIEditor_Window[1]) GUIEditor_Button[13] = guiCreateButton(9,309,435,45,"CERRAR",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(35,-668,5,600,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(271,37,165,257,"No agas Spam ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Image[1] = guiCreateStaticImage(243,134,204,120,"images/mtalogo.png",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",getRootElement(), function () if (source == GUIEditor_Button[13]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif (source == GUIEditor_Button[1]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"fail.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[2]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"ayuwoki.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[3]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"hola.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[4]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"cuack.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[5]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"mario.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[6]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"disco_pogo.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[7]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"membrillo.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end elseif (source == GUIEditor_Button[8]) then if enabled then enabled = false triggerServerEvent("sendSound",getLocalPlayer(),"aweonao.mp3") setTimer(setState,60000,1) else outputChatBox("Solo Puedes Hacerlo cada 60 Segundos",255,0,0) end end end) function setState() enabled = true end addEvent("returnSound",true) addEventHandler("returnSound",getRootElement(), function (sound) playSound("files/".. tostring(sound),false) end) function bindIt ( ) bindKey ( 'F7', 'down', showIt ) end addEventHandler ( 'onClientResourceStart', resourceRoot, bindIt ) function showIt ( ) isVisible = guiGetVisible ( GUIEditor_Window[1] ) if (isVisible) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end if (not isVisible) then guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end
-
Sure, and i want to be the U.S president C'mon, you can't come here and ask for something to be done (even worst asking like that).
-
John, i was thinking the same, but since he posted server-side, i continued the code.
-
Sounds great (Not interested on using it but well ), good job, and good luck with it
-
You're right, Simbad, he quoted a wrong post This was Simbad's original post: I don't think San Andreas is dead/dieing, have a look at the sa:mp player count.
-
Try downloading again the editor.
-
jajajjaajaja, me olvide de esa parte creo que se como se arregla hamburgerPositions = { {377,-68,1001.51,10,8,0} , {380.44,-8.65,1001.85,9,0}, {379.42,-119.65,1001.49,5,0} } -- The positions for the hamburger, in the style: x,y,z,interior,dimension --[[ This is the hunger script. You can add hamburgers by adding it in hamburgerPositions. It works easy, just a after it, and filling in! {x,y,z,interiorID,dimension} When it isn't the last position, it needs a "," after it ]]-- -- DONT CHANGE ANYTHING AFTER THIS WITHOUT KNOWLEDGE! addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()), function () hungerProcess = guiCreateProgressBar(0.7763,0.28,0.1775,0.04,true) guiMoveToBack (hungerProcess) guiProgressBarSetProgress(hungerProcess,100) hungerLabel = guiCreateLabel(0.7775,0.2817,0.1737,0.0367,"Estado de Hambre",true) guiLabelSetColor(hungerLabel,255,255,255) guiLabelSetVerticalAlign(hungerLabel,"center") guiLabelSetHorizontalAlign(hungerLabel,"center",false) guiSetFont(hungerLabel,"default-small") for i,v in ipairs (hamburgerPositions) do local hamburger = createPickup (v[1],v[2],v[3],3,2768,100) local hamburgerMarker = createMarker (v[1],v[2],v[3],"corona",1,255,255,0,80) setElementData (hamburgerMarker,"HAMBURGER!",true) setElementInterior (hamburgerMarker,v[4]) setElementInterior (hamburger,v[4]) setElementDimension(hamburger,tonumber(v[5])) setElementDimension(hamburgerMarker,tonumber(v[5])) end setTimer (dropDownHungerState,45000,0,getLocalPlayer()) end) function setHungerState (player,hungerState) if (player == getLocalPlayer()) then guiProgressBarSetProgress(hungerProcess,hungerState) end end function getHungerState (player) if (player == getLocalPlayer()) then return guiProgressBarGetProgress(hungerProcess) end end function dropDownHungerState (player) if (player == getLocalPlayer()) then guiProgressBarSetProgress(hungerProcess,guiProgressBarGetProgress(hungerProcess) -1) if (guiProgressBarGetProgress(hungerProcess) == 0) then setElementHealth (player,getElementHealth (player) -25) outputChatBox ("Rapido! tienes que comer algo!",255,0,0,false) elseif (guiProgressBarGetProgress(hungerProcess) == 10) then outputChatBox ("Peligro! Tienes Mucha Hambre!",255,0,0,false) end end end addEventHandler ("onClientPlayerSpawn",getRootElement(), function (team) setHungerState (source,100) end) addEventHandler ("onClientMarkerHit",getRootElement(), function(hitEle,dim) if (getLocalPlayer() == hitEle) and (getElementData (source,"HAMBURGER!") == true) and (dim) then if (getHungerState (hitEle) < 50) then setHungerState (hitEle,100) triggerServerEvent("takeTheMoney",getLocalPlayer(),getLocalPlayer(),50) outputChatBox ("HAMBURGER POWER!",255,0,255,false) outputChatBox ("No Tienes Mas Hambre.",255,0,255,false) else outputChatBox ("Tu no Nesecitas Comer!",255,0,255,false) end end end) Dime si te funciona
-
--client side hamburgerPositions = { {377,-68,1001.51,10,8,0} , {380.44,-8.65,1001.85,9,0}, {379.42,-119.65,1001.49,5,0} } -- The positions for the hamburger, in the style: x,y,z,interior,dimension --[[ This is the hunger script. You can add hamburgers by adding it in hamburgerPositions. It works easy, just a after it, and filling in! {x,y,z,interiorID,dimension} When it isn't the last position, it needs a "," after it ]]-- -- DONT CHANGE ANYTHING AFTER THIS WITHOUT KNOWLEDGE! addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()), function () hungerProcess = guiCreateProgressBar(0.7763,0.28,0.1775,0.04,true) guiMoveToBack (hungerProcess) guiProgressBarSetProgress(hungerProcess,100) hungerLabel = guiCreateLabel(0.7775,0.2817,0.1737,0.0367,"Estado de Hambre",true) guiLabelSetColor(hungerLabel,255,255,255) guiLabelSetVerticalAlign(hungerLabel,"center") guiLabelSetHorizontalAlign(hungerLabel,"center",false) guiSetFont(hungerLabel,"default-small") for i,v in ipairs (hamburgerPositions) do local hamburger = createPickup (v[1],v[2],v[3],3,2768,100) local hamburgerMarker = createMarker (v[1],v[2],v[3],"corona",1,255,255,0,80) setElementData (hamburgerMarker,"HAMBURGER!",true) setElementInterior (hamburgerMarker,v[4]) setElementInterior (hamburger,v[4]) setElementDimension(hamburger,tonumber(v[5])) setElementDimension(hamburgerMarker,tonumber(v[5])) end setTimer (dropDownHungerState,45000,0,getLocalPlayer()) end) function setHungerState (player,hungerState) if (player == getLocalPlayer()) then guiProgressBarSetProgress(hungerProcess,hungerState) end end function getHungerState (player) if (player == getLocalPlayer()) then return guiProgressBarGetProgress(hungerProcess) end end function dropDownHungerState (player) if (player == getLocalPlayer()) then guiProgressBarSetProgress(hungerProcess,guiProgressBarGetProgress(hungerProcess) -1) if (guiProgressBarGetProgress(hungerProcess) == 0) then setElementHealth (player,getElementHealth (player) -25) outputChatBox ("Rapido! tienes que comer algo!",255,0,0,false) elseif (guiProgressBarGetProgress(hungerProcess) == 10) then outputChatBox ("Peligro! Tienes Mucha Hambre!",255,0,0,false) end end end addEventHandler ("onClientPlayerSpawn",getRootElement(), function (team) setHungerState (source,100) end) addEventHandler ("onClientMarkerHit",getRootElement(), function(hitEle,dim) if (getLocalPlayer() == hitEle) and (getElementData (source,"HAMBURGER!") == true) then if (getHungerState (hitEle) < 50) then setHungerState (hitEle,100) triggerServerEvent("takeTheMoney",getLocalPlayer(),getLocalPlayer(),50) outputChatBox ("HAMBURGER POWER!",255,0,255,false) outputChatBox ("No Tienes Mas Hambre \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />",255,0,255,false) else outputChatBox ("Tu no Nesecitas Comer!",255,0,255,false) end end end) --server side addEvent("takeTheMoney",true) addEventHandler("takeTheMoney",getRootElement(), function (cliente,monto) if getPlayerMoney(cliente) >= tonumber(monto) then takePlayerMoney(cliente,tonumber(monto)) end end) Como puedes ver, e creado otro script mas, ese es para quitarle el dinero al jugador (es preferible usarlo en el lado server-side, que yo sepa takePlayerMoney tiene errores en el cliente ) Bueno, ahora deberia enviar a las hamburgesas a las dimensiones, como veras agregue otro valor a la tabla, "0" (es el ultimo valor) eso define la dimension de la hamburgesa. debes crear otro script que puede ser: server.lua y luego agregarlo al meta.xml y poner type="server". Saludos.
-
Acitano, that's not a valid example. --server side myMarker = createMarker (2308.87,-1.91,25.9,"cylinder",1,255,0,0,128) function showGui (hitPlayer, matchingDimension) triggerClientEvent(hitPlayer,"showGUI",getRootElement()) end addEventHandler("onMarkerHit",myMarker,showGui) --client side addEvent("showGUI",true) addEventHandler("showGUI",getRootElement(), function () guiSetVisible(myGUIElement,true) end)
-
Es muy facil, postea todo el codigo.
-
I can play GTA:IV, but i don't have it, i love the phisics and so on, but it's like, GTA:SA has more features to offer.
-
Well, sounds like there we're two with the same tag. Back on topic: I could help you out, i'm experienced on LUA, XML, SQLite (not MySql, i don't know much of it) if you want to contact me i will pm you my MSN address.
-
Well, that's really strange, because i've been there yesterday, and the owner needed an scripter, but the truth is, he didn't had the money to pay for one.
