Jump to content

JohnDoe91286

Members
  • Posts

    37
  • Joined

  • Last visited

Posts posted by JohnDoe91286

  1. How would I do that?

    function keepWanted ()
    wlevel = getPlayerWantedLevel ( source )
    setPlayerWantedLevel ( source, wlevel )
    end
    addEventHandler ( "onPlayerWasted", getRootElement(), keepWanted )
    

  2. I have a wanted system running on my server, it all works fine exept for the fact that hardcored into MTA the wanted level is set to 0 onPlayerWasted. Is there any way of manually removing this or does it have to be un-hardcored from MTA? I mean, could it be un-hardcored because it gives better oppertunities then? If somebody wanted it how it is now all they would have to use is the code below. And of course, if they wanted it like I do, they just let the wanted level stay as it is.

    function resetWanted ()
    setPlayerWantedLevel ( source, 0 )
    end
    addEventHandler ( "onPlayerWasted", getRootElement(), resetWanted )
    

    IRC

    Hey, I got banned from #mta for linking to a pornographic video. I didn't know that wasn't allowed, please could I be unbanned? Now I know it's not allowed I won't do it again.

  3. I have a GUI Spawn Menu for my DP2.3 server. I want to make a much better one for MTA 1 but I don't have enough room on the spawn menu for any new classes. Does anybody know a good design of spawn menu that has loads of room for additional classes?

  4. I am trying to get the players blips on the minimap to change colour depending on which team they are.Why dosn't the code below work?

    function setBlipColor ()
    local playerTeam = getPlayerTeam ( source )
    if ( playerTeam == Police ) then
    setPlayerBlipColor ( 0, 0, 255 )
    end
     
    addEventHandler ( "onPlayerSpawn, getRootElement(), setBlipColor )
    

  5. Is there a command to put in a script that makes a bind key for players like when freeroam is on "F" becomes the bind key for Jeptack toggle. I want to make a vehicle engine on/off toggle.

  6. Would anybody know how to turn a GUI Button spawn menu into a GUI Grid List spawn menu?

    Below is the current code for a GUI Button Spawn Menu (some parts have been removed)

    addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ),
        function ( )
            myWindow = guiCreateWindow ( 0.12, 0.1, 0.8, 0.8, "Twiva Spawn menu", true )
            button = guiCreateButton( 0, 0.1, 0.2, 0.1, "Pilot", true, myWindow )
            addEventHandler( "onClientGUIClick", button, spawner, false, myWindow )
        end
    )
     
     
    function spawner ( )
        triggerServerEvent ( "onGreeting", getLocalPlayer() )
    end
     
    function spawned ( )
    guiSetVisible ( myWindow, false )
    guiSetVisible ( myWindow2, false )
    showCursor(false)
    end
    addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), spawned )
     
    function died ( )
    guiSetVisible ( myWindow, true )
    guiSetVisible ( pic1, true )
    guiSetVisible ( pic2, true )
    fadeCamera ( source, false )
    end
    addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), died )
     
     
    function changeVisibility ( )
     
            -- we check if the gui element is visible
            if guiGetVisible ( myWindow )  then
                    -- if it is, we hide it
                    showCursor(true)
            else
                    showCursor(false)
            end
    end
     
    setTimer ( changeVisibility, 1000, 0 )
     
     
    

  7. I have a spawn menu in DP2.3 that works fine. I have tried putting it onto aa test server in nightly but when I spawn as a class you just see the sky and nothing else. The code for one of the classes is below...

    function spawncop ( message ) -- this one is cop 
    spawnPlayer ( source, -1617.4661865234, 674.52569580078, 7.1875, -35, 280 ); 
    fadeCamera ( source, true ); 
    end 
    addEvent( "spawncop", true ); 
    addEventHandler( "spawncop", getRootElement(), spawncop ); 
      
    

    Also the spawn GUI script is below

    addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), 
        function ( ) 
            myWindow = guiCreateWindow ( 0.12, 0.1, 0.8, 0.8, "Twiva Spawn menu", true ) 
            button2 = guiCreateButton( 0.3, 0.1, 0.2, 0.1, "SFPD", true, myWindow ) 
            addEventHandler( "onClientGUIClick", button2, spawner2, false, myWindow ) 
        end 
    ) 
      
    function spawner2 ( ) 
    triggerServerEvent ( "spawncop", getLocalPlayer() ) 
    end 
    

    And the team settings are below

    createTeam ( "Police", 0, 0, 255 ) 
    function giveweps () 
    local skin = getElementModel ( source ) 
    if ( skin == 280 ) then 
    local teamcop = getTeamFromName ( "Police" ) 
    giveWeapon ( source, 3, 1 ) 
    giveWeapon ( source, 29, 450 ) 
    setPlayerTeam ( source, teamcop )    
    end 
    end 
    addEventHandler ( "onPlayerSpawn", getRootElement(), giveweps ) 
    

    How can I make it so it actually spawns?

  8. I want to make it so when you type /wanted it comes up with a list of all the wanted players. I have done everything but the outputChatBox part. What do I need to modify of the code below to make it only appear to the player who has typed /wanted?

    outputChatBox ( getClientName ( thePlayer ) .. " has a wanted level of " .. level .. " stars!" )

  9. Is there any way of making it so when i click a certain class on my spawn screen another box comes up prompting a password. If you get the password right you can spawn that class. If you get it wrong you don't spawn as that class and either have to retry entering the password or leaving that class alone. If for any reason you need my Button code it is below.

            button10 = guiCreateButton( 0.0, 1.0, 0.01, 0.01, "Admin", true, myWindow ) 
            addEventHandler( "onClientGUIClick", button10, spawner10, false, myWindow ) 
    

  10. I want to use this script that kicks a player for spawning a Rocket launcher or minigun. I used the command in the script "kickplayer (source)" but whenever somebody spawns one it says on console "WARNING: mini.lua: Access denied @ 'kickPlayer' - Line: 6". How yould I allow it to kick aa player??? Also is there a command to make an exeption for admin class???

  11. I have made a script for car spawn points all over LS the only problem is I can't seem to make a respawner. I need the cars to respawn 10 secs after they explode. Anybody got a basic script for that.

×
×
  • Create New...