Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. post here what you tryied to do.
  2. Castillo

    Bot/Ped

    createPed --> https://wiki.multitheftauto.com/wiki/CreatePed setPedControlState --> https://wiki.multitheftauto.com/wiki/SetPedControlState i created long time ago a script with those functions that allows me to control a ped which is in a vehicle to drive with the arrow keys.
  3. <meta> <script src="FILE NAME HERE.lua" type="server" /> </meta> https://wiki.multitheftauto.com/wiki/Resources
  4. Castillo

    roleplay

    thats not all, you can look for tons of functions and find out how they work, most has examples with it.
  5. This is just a greenzone that will kill the zombies? or i got something wrong?
  6. function createRulesWindow() local sWidth, sHeight = guiGetScreenSize() local Width,Height = 445,445 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) rulesWindow = guiCreateWindow(X,Y,Width,Height,"Rules",false) guiWindowSetMovable(rulesWindow,false) guiWindowSetSizable(rulesWindow,false) rulesButton = guiCreateButton(137,394,158,37,"Accept",false,rulesWindow) rulesLabel = guiCreateLabel(10,25,425,359,[[ Welcome to Fun Flight Server! Please carefully read the rules before accepting. By accepting the rules, you are agreeing to play by them. Anyone caught breaking these rules will be kicked and/or banned from this server. If you do not accept the rules within 90 seconds, you will be kicked. 1: No cheating. 2: No bug abuse. 3: No mods to your game. 4: No flaming. 5: Respect other players. 6: Be nice! 7: No shooting! 8: No jacking!]],false,rulesWindow) guiLabelSetHorizontalAlign(rulesLabel,"center",true) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createRulesWindow() addEventHandler("onClientGUIClick",rulesButton,acceptRules,false) showCursor(true,true) end ) function acceptRules(button,state) if button == "left" and state == "up" then guiSetVisible(rulesWindow, false) showCursor(false,false) outputChatBox("Thank you for accepting our rules. Have fun!") if rulesWarningTimer then killTimer(rulesWarningTimer) rulesWarningTimer = nil end end end function inactivePlayer(status) if status == 1 then outputChatBox("Please accept our rules or be kicked.") rulesWarningTimer = setTimer(inactivePlayer,30000,1,2) elseif status == 2 then outputChatBox("FINAL WARNING: Please accept our rules or be kicked.") rulesWarningTimer = setTimer(inactivePlayer,30000,1,3) elseif status == 3 then triggerServerEvent("clientKickInactivePlayer",getLocalPlayer()) end end rulesWarningTimer = setTimer(inactivePlayer,30000,1,1) addEvent("clientKickInactivePlayer",true) function kickInactivePlayer() kickPlayer(client,"Please accept our rules.") end addEventHandler("clientKickInactivePlayer",root,kickInactivePlayer)
  7. try adding the resource to group admin in acl.xml
  8. Castillo

    please help

    maybe tell us what doesn't works?
  9. There is not such resource available for public. about how to create rating system well, you will need to learn how to script for that https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://wiki.multitheftauto.com/wiki/Introduction_to_Scripting_the_GUI Good luck.
  10. Neukfout, why are you posting on really old/solved posts?
  11. Stop spamming Neukfout.
  12. Castillo

    please help

    not sure but maybe if you change: if survivorsCount ~= 0 then to: if survivorsCount == 0 then ?
  13. try, function attachtoveh ( playerSource, commandName, name ) names = getPlayerFromName ( name ) if names then vehicle = getPedOccupiedVehicle ( names ) if vehicle then attachElements ( playerSource, vehicle ) end end end addCommandHandler ( "attach", attachtoveh )
  14. addCommandHandler('bm', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox(getPlayerName( player ) .. 'bought' .. getMapName( g_ForcedNextMap ), g_Root, 0, 240, 0) if getPlayerMoney(player) >= 5000 then takePlayerMoney ( player, 5000) end end )
  15. addCommandHandler('bm', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then exports.race:outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.everyone) then return end local map, errormsg = findMap( query ) if not map then exports.race:outputRace( errormsg, player ) return end if g_ForcedNextMap == map then exports.race:outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox(getPlayerName( player ) .. 'bought' .. getMapName( g_ForcedNextMap ), g_Root, 0, 240, 0) takePlayerMoney ( player, 5000) end ) this only fixes the outputRace errors, you still got errors with variables.
  16. uhm try this (not tested) addCommandHandler('bm', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.everyone) then return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox(getPlayerName( player ) .. 'bought' .. getMapName( g_ForcedNextMap ), g_Root, 0, 240, 0) takePlayerMoney ( player, 5000) end )
  17. Castillo

    OMG

    the only way to help you is giving the wiki link to start learning, we don't accept request. https://wiki.multitheftauto.com/wiki/Scripting_Introduction start with easy stuff like commands etc. Good luck.
  18. Castillo

    OMG

    question: you aren't the COOKIE from DMC server, right?
  19. i have tested it with a timer and when you move way the place where you created it outputs 1 test code: addCommandHandler("col", function () X, Y, Z = getElementPosition(getLocalPlayer()) col = createColCircle(X, Y, 150) setTimer(check,1000,0) end) function check() outputDebugString(tostring(#getElementsWithinColShape(col, "player"))) end
  20. we are helping you but you won't listen to us.
  21. admin powers is not worth for months of scripting, also i don't think there is anyone willing to help since they have their own projects already.
  22. don't try to force someone to reply because that will result on none reply, be patient.
  23. Castillo

    Streaming

    it does, this is the way: local sound = playSound("link goes here")
×
×
  • Create New...