Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    RPG???

    My post is very clear, what didn't you get from it?
  2. Castillo

    Admins Spawn

    function adminRespawn () local account = getPlayerAccount(source) if account then local accountName = getAccountName(account) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then spawnPlayer (source, 218, 1867, 13, 0, math.random (211,217), 0, 0 ) end end end addEventHandler ("onPlayerWasted", root, adminRespawn)
  3. Castillo

    Friendly Fire

    Disable the friendly fire for every team? team1 = createTeam(text,r,g,b) setTeamFriendlyFire(team1,false) I had problems in the past setting for all the teams.
  4. Stolen resources from Valhalla gaming. https://community.multitheftauto.com/ind ... ls&id=2139 https://community.multitheftauto.com/ind ... ls&id=2140
  5. Well, i said "LEARN", if i'm not wrong?
  6. I suposed they we're from Jasper's resource
  7. Castillo

    Killmessages

    addEvent("onZombieWasted") addEventHandler( "onZombieWasted", getRootElement(), function (killer) killerName = getPlayerName(killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=0,b=0},"Zombie"},getRootElement(),wr,wg,wb ) end) It should work (tested).
  8. Don't triple-post!
  9. Awesome work dude!, i'll go right now and check it out.
  10. We don't accept request here, learn to make it by yourself.
  11. We don't accept request, learn to make it by yourself. https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI Good luck.
  12. Pues, remplaza una por otra?
  13. Hey there, i'm glad to announce a new up-coming version of this resource, this version will let you chat with as many friends as you want per time, also it has a custom button style created by me, it will also fix some minnor issues on the code. If you have any suggestion fell free to post here. Greetings, Castillo.
  14. Traffic functions are only 1.1 onwards, you can't use them on lower versions of MTA.
  15. function NS(command, g, r) -- "function" must be with lowercase setTrafficLightState ( tostring(g), tostring(r) ) end -- every function must contain an "end" in the end function EW(command, r, g) setTraffivLightState ( tostring(r), tostring(g) ) end addCommandHandler ( "NSgreenlight", NS ) addCommandHandler ( "EWgreenlight", EW )
  16. Castillo

    Map

    I'll give you the code of my OWN freeroam (it's a resource made totally from scratch, not an Arc_'s edit) since i don't use this resource, made it for fun when i was bored. sanAndreasMapWindow = guiCreateWindow(167,8,691,742,"Select destination",false) guiSetVisible(sanAndreasMapWindow, false) guiWindowSetSizable(sanAndreasMapWindow, false) imgMap = guiCreateStaticImage(9,41,673,649,"images/map.png",false,sanAndreasMapWindow) closeMapWindow = guiCreateButton(301,702,108,30,"Close",false,sanAndreasMapWindow) function mapPositionSet(x, y) local ele = getLocalPlayer() local vehicle = getPedOccupiedVehicle ( getLocalPlayer() ) local z_add = 1.5 if (vehicle) then ele = vehicle z_add = 3.0 end local knockoff_old = canPedBeKnockedOffBike(getLocalPlayer()) setPedCanBeKnockedOffBike(getLocalPlayer(), false) setElementPosition(ele, x, y, 600.0) setElementVelocity(ele, 0, 0, 0) fadeCamera(false, 0) setTimer(fadeCamera, 800, 1, true, 1.0) setTimer( function() local z = getGroundPosition(x, y, 600.0) local waterlvl = getWaterLevel(x, y, 0.0) local waterlvl2 = getWaterLevel(x, y, 50.0) if (waterlvl2) then waterlvl = waterlvl2 end if (waterlvl) then if (z < waterlvl) then z = waterlvl end end setPedCanBeKnockedOffBike(getLocalPlayer(), knockoff_old) setElementVelocity(ele, 0, 0, 0) setElementPosition(ele, x, y, z+z_add) setElementInterior(ele,0) if (vehicle) then setVehicleTurnVelocity(vehicle, 0, 0, 0) setElementRotation(vehicle, 0, 0, 270) end end ,800, 1) end function onImageClick(button, state, absoluteX, absoluteY) local wndPosX, wndPosY = guiGetPosition(sanAndreasMapWindow, false) local imgX, imgY = guiGetPosition(imgMap, false) local imgSizeX, imgSizeY = guiGetSize(imgMap, false) local relPosX = (absoluteX-wndPosX-imgX+0.5)/imgSizeX - 0.5 local relPosY = 0.5 - (absoluteY-wndPosY-imgY+0.5)/imgSizeY mapPositionSet(relPosX*6000, relPosY*6000) guiSetVisible(sanAndreasMapWindow,false) end addEventHandler("onClientGUIClick", imgMap, onImageClick, false) function closeTheMap() guiSetVisible(sanAndreasMapWindow,false) end addEventHandler("onClientGUIClick", closeMapWindow, closeTheMap, false)
  17. Try this: addEvent("onPostFinish", true) addEventHandler("onPostFinish", g_Root, function() for i, player in ipairs(getElementsByType("player")) do if getElementData(player, "isLogged") == true then local mapsplayed = executeSQLSelect("stats", "mapsplayed", "account = '" ..getElementData(player, "playerAcc").. "'") local newvalue = tonumber(mapsplayed[1]["mapsplayed"]) +1 executeSQLUpdate("stats", "mapsplayed = '".. newvalue .."'", "account = '".. getElementData(player, "playerAcc") .."'") end end end )
  18. Creo que con esto lo haces: https://wiki.multitheftauto.com/wiki/Set ... tagShowing
  19. Another car mod: https://community.multitheftauto.com/ind ... ls&id=2128
  20. Jajaja, no es para tanto che
  21. Tambien te habias olvidado un end, y otras cositas
  22. This thing is still bugged , i'm out of ideas, i don't know why it won't work, here's the new code. Edit: Remp helped me in the IRC channel, and seems to work fine his code, thanks to everyone, specially to Remp
×
×
  • Create New...