Jump to content

KraZ

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by KraZ

  1. KraZ

    Menu

    OMFG THAT IS THE SICKEST IVE EVER SEEN? Can you add me on skype so If i get stuck scripting I could ask for help with dxFunctions and mouseOver functions? please. please? my skype: TheSevenGraphics
  2. How would i use the onClientMouseEnter client event, so when your cursor is over a dx text or image it will display a different image or text or change the colour of text, And also how would i use a dxText/image as a button, Could someone post some source code so I can see how its done or can someone help me? onClientGUIClick onClientMouseEnter onClientMouseLeave
  3. Hey Im wondering why is there no MultiTheftAuto for IV/Ballad Of Gay Tony/Lost And Damned? And will there be one for GTA:V? Because I love MTA its the best multiplayer software for GrandTheftAuto and I would love to be able to play it on GTA:V or even create a server on it, Wouldn't it be easier to create a MTA client for these games since multiplayer is already built in so all you are doing is modding the multiplayer software to add support for custom servers and GUI's and stuff?
  4. I haven't got any code yet because im not sure how I would go about doing this but could someone type a basic server and client side code on how you would set a serverside timer and when someone joins it displays that timer to them? I tried this once but the timer was reset everytime someone new joins, that is because I had the timer clientside, could someone just do this basic code for me please, I could do the rest like dxText etc...
  5. KraZ

    question,

    How would i set a timer and show the same time to everyone, So say someone has been in a game for like 5 minutes and someone joins late, how would i show them the current time left of the game and not restart the timer?
  6. KraZ

    Help?

    ow yeah obvcourse, debug says expected string at argument 1 on triggerClientEvent
  7. KraZ

    Teams problem:

    This is all you have? Can you post abit more of the script if you can?
  8. KraZ

    Help?

    Doesn't work btw, Gui doesn't display, heres client and serverside: --Serverside addEventHandler("onPlayerLogin", root, function() triggerClientEvent(source, "showTeamWindow", source) end ) --Clientside addEvent("showTeamWindow", true) addEventHandler("showTeamWindow", root, function() guiSetInputEnabled(true) showCursor(true) teamSelectionWindow = guiCreateWindow(489, 284, 388, 109, "Select a team:", false) guiWindowSetSizable(teamSelectionWindow, false) criminalButton = guiCreateButton(14, 31, 171, 54, "Criminals", false, teamSelectionWindow) addEventHandler("onClientGUIClick", criminalButton, selectCrim, false) guiSetFont(criminalButton, "default-bold-small") guiSetProperty(criminalButton, "NormalTextColour", "FFAAAAAA") copButton = guiCreateButton(195, 31, 171, 54, "Law Enforcement", false, teamSelectionWindow) addEventHandler("onClientGUIClick", copButton, selectCop, false) guiSetFont(copButton, "default-bold-small") guiSetProperty(copButton, "NormalTextColour", "FFAAAAAA") end )
  9. KraZ

    Help?

    Thanks, Im not bad at scripting and don't normaly need to post here, Its just haven't scripted in a long time and can't remember alot of things, Ah well thanks anyways, There is my gamelobby and login script finished just the exp system and stuff now
  10. Try this: --Clientside addEventHandler("onClientResourceStart",root, function() showPlayerHudComponent("radar" ,false) showChat(false) end) --Serverside addEventHandler("onPlayerLogin",root, function() showPlayerHudComponent("radar" ,true) showChat(true) end)
  11. KraZ

    Help?

    How would i be able to trigger a client event from the serverside once a player logs in but only for that player so something like... addEventHandler("onPlayerLogin", root, function() triggerClientEvent("showTeamWindow", getRootElement()) end ) but this shows the window(GUI) for every player instead of just the one who logs in... help me please?
  12. KraZ

    I need help!

    oi hi! why won't you reply on skype? anyways thanks, It seems to be working now
  13. KraZ

    I need help!

    Okay so im making a TDM server based on objective based games like bank robbery, defend the vault for 5 mins to win, etc... So i made this script but for some reason it doesn't spawn a player and stuff, i have no debug errors either, Basically the timer and everything works but once it starts the activity it shows a gui which is below, but then I click on the button to pick a team i send that to the serverside and it doesn't spawn the player or set the player team, any help? GUI addEvent("showTeamWindow", true) addEventHandler("showTeamWindow", getRootElement(), function() guiSetInputEnabled(true) showCursor(true) teamSelectionWindow = guiCreateWindow(489, 284, 388, 109, "Select a team:", false) guiWindowSetSizable(teamSelectionWindow, false) criminalButton = guiCreateButton(14, 31, 171, 54, "Criminals", false, teamSelectionWindow) addEventHandler("onClientGUIClick", criminalButton, selectCrim, false) guiSetFont(criminalButton, "default-bold-small") guiSetProperty(criminalButton, "NormalTextColour", "FFAAAAAA") copButton = guiCreateButton(195, 31, 171, 54, "Law Enforcement", false, teamSelectionWindow) addEventHandler("onClientGUIClick", copButton, selectCop, false) guiSetFont(copButton, "default-bold-small") guiSetProperty(copButton, "NormalTextColour", "FFAAAAAA") end ) function selectCop(button, state) if button == "left" and state == "up" then triggerServerEvent("selectCopTeam", getLocalPlayer()) end end function selectCrim(button, state) if button == "left" and state == "up" then triggerServerEvent("selectCrimTeam", getLocalPlayer()) end end SERVERSIDE: addEventHandler("onResourceStart", resourceRoot, function() criminalTeam = createTeam ( "Criminal", 255, 0, 0 ) policeTeam = createTeam ( "Police", 0, 0, 255 ) defaultTeam = createTeam ( "Default", 255, 255, 255 ) end ) addEvent("selectCopTeam", true) addEventHandler("selectCopTeam", getRootElement(), function() setPlayerTeam ( source, policeTeam ) spawnPlayer(source, 1344, 3257, 52, 0, 285) end ) addEvent("selectCrimTeam", true) addEventHandler("selectCrimTeam", getRootElement(), function() setPlayerTeam ( source, criminalTeam ) spawnPlayer(source, 1389, 3292, 4, 0, 104) end ) function player_Wasted( ammo, attacker, weapon, bodypart ) if ( attacker ) then local tempString if ( getElementType ( attacker ) == "player" ) then givePlayerMoney ( attacker, 100 ) end local teamCriminal = getTeamFromName ( "Criminal" ) local teamPolice = getTeamFromName ( "Police" ) local playerTeam = getPlayerTeam ( source ) if ( playerTeam == teamCriminal) then spawnPlayer(source, 1389, 3292, 4, 0, 104) elseif (playerTeam == teamPolice) then spawnPlayer(source, 1344, 3257, 52, 0, 285) end end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) function activityStart() triggerClientEvent("showTeamWindow", getRootElement()) triggerClientEvent("bankRob", getRootElement()) end addEvent("startActivity", true) addEventHandler("startActivity", getRootElement(), activityStart) function activityStop() for id, allPlayers in ipairs(getElementsByType("player")) do local teamDefault = getTeamFromName ( "Default" ) setPlayerTeam ( allPlayers, teamDefault ) killPed( allPlayers ) end end addEvent("stopActivity", true) addEventHandler("stopActivity", getRootElement(), activityStop)
  14. KraZ

    help?

    OMG, My awsome programming skills failed to notice the META LOL!
  15. KraZ

    help?

    Why doesn't this work? No debug errors, and timer doesn't show up, Can't find the problem, someone help me please? addEventHandler( "onClientResourceStart", getRootElement(), function() addEventHandler("onClientRender", root, draw) if isTimer(timer) then killTimer(timer) end timer = setTimer(function() removeEventHandler("onClientRender", root, draw) triggerServerEvent("startActivity", getRootElement()) end,500000,1) end) ------------------------------------------------------- function draw() if isTimer(timer) then local timeLeft = math.ceil(getTimerDetails(timer) / 1000) dxDrawText("Time Till Activity: ", 989, 175, 1391, 277, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false) dxDrawText( tostring(timeLeft), 989, 175, 1391, 277, tocolor(255, 255, 255, 255), 1, "default", "left", "top", false, false, true, false, false) end end
  16. Im offering my scripting services, Add me on skype: TheSevenGraphics NOTE: Im an intermediate lua scripter, Im not pro.
  17. Hey add me on skype, Let's talk.. Skype: TheSevenGraphics
  18. This resource allows you to create zones on your server, To create zones you have to copy the existing code and paste it and change the cords etc... I do not recommend you downloading this unless you know basic scripting. Sorry i didn't make this into templates or commands but if someone wishes to do so I just want a little credit thats all. Features: - Allows/Disallows specific People (Change the "function.addAccount" to do this) - Disallows Zombies to enter zones if you have zombies enabled. - If a player doesn't have permission to enter the zone it warps them safely to groveStreet you may change this... - Allows/Disallows players to shoot in the area Please vote 5 if you have any questions, Comment or email me Thanks: - LINK: https://community.multitheftauto.com/ind ... ls&id=5506
  19. Thats the wrong meta sorry. the original meta is this but with different name and it has another script obviosuly client..
  20. Meta: --SERVER SIDE-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- radar = createRadarArea(2418.4255371094, -1735,121.6306152344,100,0,150,0,153) setElementData(radar,"zombieProof",true) staffZone = createColRectangle (2418.4255371094, -1735,121.6306152344,100) addEventHandler("onColShapeHit", staffZone, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end) function enterArea(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar, posX, posY) if (inArea) then if hasObjectPermissionTo ( thePlayer, "command.slap", false ) then outputChatBox("Welcome to the StaffZone", thePlayer, 0, 255, 0, true) else triggerClientEvent ( "displayTimer", getRootElement()) end end end addEventHandler("onColShapeHit", staffZone, enterArea) function warp(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar, posX, posY) if (inArea) then if hasObjectPermissionTo ( thePlayer, "command.slap", false ) then outputChatBox("Welcome to the StaffZone", thePlayer, 0, 255, 0, true) else outputChatBox("You are not allowed in this area, Sorry...", thePlayer, 255, 0, 0, true) outputChatBox("You have been warped.", thePlayer, 255, 0, 0, true) if true then setElementPosition(thePlayer, 2341.2072753906, -1658.8668212891, 13.379216194153) end end end end addEvent("warp", true) addEventHandler("warp", getRootElement(), warp)
  21. It says... Triggered server event displayTimer, but event isnt added ClientSide
  22. Why doesn't my script work? no debug errors... http://pastebin.com/f9hvvZ78
  23. There are no errors and im not sure what is wrong so I was wondering if someone could help me. addEvent ( "onZombieWasted", true ) function addEXP() local playerAccount = getPlayerAccount ( source ) if ( playerAccount ) and not isGuestAccount ( playerAccount ) then if ( attacker ) and ( attacker ~= source ) then givePlayerMoney(7, source) local experiance = getAccountData ( playerAccount, "levels.exp" ) if ( experiance ) then experiance = experiance + 1 setAccountData(playerAccount, "levels.exp", experiance) triggerClientEvent ( "expDisplay", getRootElement()) end end end end addEventHandler( "onZombieWasted", getRootElement(), addEXP) function LevelUP( source ) local playerAccount = getPlayerAccount ( source ) if ( playerAccount ) and not isGuestAccount ( playerAccount ) then local levels = getAccountData ( playerAccount, "levels.level" ) local experiance = getAccountData ( playerAccount, "levels.exp" ) if ( experiance == 300 ) then levels = levels + 1 outputChatBox ( "Congratulations To" ..getPlayerName(playerAccount)" He Is Now Level:" ..getAccountData ( playerAccount, "levels.level" ), 0,255,0 ) experiance = 0 setAccountData(playerAccount, "levels.level" ) setAccountData(playerAccount, "levels.exp" ) triggerClientEvent ( "lvlUPSound", getRootElement()) end end end
  24. You want us to host a server for you? unfortunatly that we cannot do as we use our VPS to host many servers not just MTA-SA
×
×
  • Create New...