Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. local selectMenu function initiateSpawn() --after player login , this is called addEventHandler("onClientRender", getRootElement(), spawnTitle) --add the MOTD createTeleportWindow() -- add the teleport menu end addEvent("startSpawn", true) -- event that is called by the login addEventHandler("startSpawn", getLocalPlayer(), initiateSpawn) function createTeleportWindow() -- create the spawn menu selectMenu = guiCreateWindow(0, 0.75, 1, 0.25, "Select a City to start!", true) buttonLS = guiCreateButton(0.125, 0.25, 0.25, 0.5, "Los Santos", true, selectMenu) buttonSF = guiCreateButton(0.375, 0.25, 0.25, 0.5, "San Fierro", true, selectMenu) buttonLV = guiCreateButton(0.625, 0.25, 0.25, 0.5, "Las Venturas", true, selectMenu) addEventHandler("onClientGUIClick", root, handleSpawn) showCursor(true) end function handleSpawn(button,state) --handler that is called by the spawn menu if button == "left" and state == "up" then if source == buttonLS then removeEventHandler("onClientRender", getRootElement(), spawnTitle) guiSetVisible(selectMenu, false) triggerServerEvent( "spawnMe", getLocalPlayer(), 1) elseif source == buttonSF then removeEventHandler("onClientRender", getRootElement(), spawnTitle) guiSetVisible(selectMenu, false) triggerServerEvent( "spawnMe", getLocalPlayer(), 2) elseif source == buttonLV then removeEventHandler("onClientRender", getRootElement(), spawnTitle) guiSetVisible(selectMenu, false) triggerServerEvent( "spawnMe", getLocalPlayer(), 3) end end end function spawnTitle() -- a MOTD using dxDraw (this works fine), based on wiki example local screenWidth, screenHeight = guiGetScreenSize() local MOTDText = [[ Welcome to ------! Latest news: - New GUIs are complete and look a lot nicer than the old ones. - Fixed the webadmin stuff for easy administration (by me -- s:P --> ). New features will be coming as I have time to add them. Meanwhile, I have decided to enable the freeroam GUI for you convenience. Remember that this is a TEMPORARY luxury! Thank you all for your continued patience while we continue development. ------ ]] local x,y = guiGetScreenSize() -- Get players resolution. dxDrawText( "Read the MOTD, or select a city to spawn in!", screenWidth/10, screenHeight/10, screenWidth, screenHeight, tocolor ( 0, 255, 255, 255 ), 1.5, "pricedown" ) dxDrawRectangle ( x/4, y/4, screenWidth/2, screenHeight/2, tocolor ( 0, 0, 0, 175 ) ) -- Create our black transparent MOTD background Rectangle. dxDrawText ( "Message of the Day:", x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) -- Create Welcome title. dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 255, 255 ), 2 ) -- Create underline shadow. dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) end function startNormalPlay() showPlayerHudComponent("ammo", true) showPlayerHudComponent("area_name", true) showPlayerHudComponent("armour", true) showPlayerHudComponent("breath", true) showPlayerHudComponent("clock", true) showPlayerHudComponent("health", true) showPlayerHudComponent("money", true) showPlayerHudComponent("radar", true) showPlayerHudComponent("vehicle_name", true) showPlayerHudComponent("weapon", true) setCameraTarget(getLocalPlayer()) showChat(true) showCursor ( false ) guiSetVisible(selectMenu, false) outputChatBox("test") end addEvent("readyToPlay", true) addEventHandler("readyToPlay", getRootElement(), startNormalPlay) Try that, i'm not sure if will work.
  2. Don't double post, i told you what to do, edit the admin panel to do what you want.
  3. If you really need an scripter, then i would suggest you to pay for one.
  4. "Empty"? actually those servers are mostly full, you can find lot of "default server name" servers with at least 25 players.
  5. What?
  6. You can set that on the DX element, it has an argument to set that. postGUI: A bool representing whether the text should be drawn on top of or behind any ingame GUI (rendered by CEGUI). Must be that i think.
  7. A friend had the same problem o_o, maybe it's a bug?
  8. We don't support request. But, you can edit the admin panel resource to do when you set the team it sets their blip color also.
  9. Let's wait to see if he puts me on the authors also.
  10. Nice one Ransom, keep the good work. P.S: I'm not used to public resources but this one tells me to do it
  11. volk-rus, he said WHEN A PLAYER LOGINS, not when a player joins the server.
  12. Hunter, just because you can make a timer it doesn't means you are an scripter also this fails. setTimer ( destroyElement, time_in_milliseconds, times_to_execute_the_function, element_name ) example of element name: myelement = createObject() P.S: Why would he use a timer instead of just destroyElement?
  13. This is a public game mode, is not written by him.
  14. XX3, i commented on the resource to be removed, i won't any translation of it.
  15. Making a Roleplay server would take much time.
  16. No if i'm right.
  17. If you don't offer a payment, forgot about getting a decent scripter
  18. Maybe he's asking for "Skills" not "kills"?
  19. killPlayer is outdated if i'm right
  20. function killBlow() for i,players in pairs(getElementsByType("player")) do killPed(players) end for i,vehicles in pairs(getElementsByType("vehicle")) do blowVehicle(vehicles) end end addCommandHandler("killandblow") Should work.
  21. what do you mean by "stats kills"??
  22. I was right, every resource at his server is stolen from another one, i would ban this guy
  23. What? btw don't double post
  24. Muscle stats, skills, etc? if so then use: setPedStat
×
×
  • Create New...