Jump to content

wannaknow

Members
  • Posts

    64
  • Joined

  • Last visited

Posts posted by wannaknow

  1. Try this:
      
    addEvent("onPostFinish", true) 
    addEventHandler("onPostFinish", g_Root, 
        function() 
            for i, player in ipairs(getElementsByType("player")) do 
                if getElementData(player, "isLogged") == true then 
                    executeSQLUpdate("stats", "mapsplayed = mapsplayed +1", "account = '".. getElementData(player, "playerAcc") .."'") 
                end 
            end 
        end 
    ) 
    

  2. To edit this go to your race resource

    Open the file racevoting_server.lua

    Then search for this:

    addCommandHandler('nextmap', 
    

    Then edit the whole function to this:

    addCommandHandler('nextmap', 
        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 admin = false 
            if isPlayerInACLGroup(player, g_GameOptions.admingroup) or isPlayerInACLGroup(player, "Moderator") then 
                admin = true 
            end 
            if not _TESTING and admin == false 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('Next map set to ' .. getMapName( g_ForcedNextMap ) .. ' by ' .. getPlayerName( player ), g_Root, 0, 240, 0) 
        end 
    ) 
    

    After this reload the race resource, and even Moderators can use the command

  3.   
    function ramp1(player,command) 
        local x,y,z = getElementPosition(player) 
        local xx,yy,zz = getElementRotation(player) 
        createObject ( 1632, x, y, z + 10, xx, yy, zz +10 ) 
    end 
    addCommandHandler("ramp",ramp1) 
      
    function ramp2(key,state) 
        local x,y,z = getElementPosition(source) 
        local xx,yy,zz = getElementRotation(source) 
        createObject ( 1632, x, y, z + 10, xx, yy, zz +10 ) 
    end 
    bindKey( "1", "down", ramp2) 
      
    

  4. if ($3 == !addcash) { 
    if ($prs.level($1,$2) >=4) { 
    if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
    else { 
    mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) >=0 { 
    pgs.add $mta.nick($1,$2) + >=0 
    } 
    } 
    } 
    

    No this will not work i am sorry

    (My previous one even don't work)

    Addcash

    if ($3 == !addcash) { 
    if ($prs.level($1,$2) >= 4) { 
    if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
    else { 
    mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) $5 
    pgs.add $mta.nick($1,$2) $5 
    } 
    } 
    } 
    

    Addpoints

      
    if ($3 == !addpoints) { 
      if ($prs.level($1,$2) >=4) { 
        if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints <name> <ammount>  
        else { 
          mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a)  $5 
          !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + $5) 
        }   
      } 
    } 
      
    

  5.   
    if ($3 == !addpoints) { 
      if ($prs.level($1,$2) >=4) { 
        if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints <name> <ammount>  
        else { 
          mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a)  >=0 { 
          !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + >=0 
        }   
      } 
    } 
      
    

  6. The timer mute line wont work either

    .timerunmuteroll 1 60 mta.unmute $1 $2 
    

    I will explain this:

    <19:18:15> WannaKnow: !roll

    <19:18:15> Admin: You receive mute for 1min...

    (here will be start the timer muteroll)

    <19:18:15> WannaKnow muted.

    <19:18:35> [uVA]Bart: !roll

    <19:18:35> Admin: You receive mute for 1min...

    (here will you delete the existsing timer called muteroll and you will start one for [uVA]Bart and WannaKnow is still muted after 1 min

    Change the code

    .timerunmuteroll 1 60 mta.unmute $1 $2 
    

    to

    .timerunmuteroll $+ $2 1 60 mta.unmute $1 $2 
    

    Bow you will add the ID of the player to the timer so i't won't be overwritten

  7. can you make !vote command for immetiately changing the map and not only for next map? :) and then for example !votenext .... for the next map :D

    Im not 100% sure what u mean, are you sure what u need isnt already added? have you read the the commands file? :lol:

    There are many commands already for changing maps for admins, but im guessing ur talking about the public?

    The !votemap command for players is set that way because someone may be busy racing, on a great time and they wouldnt want the race changing instantly.

    The command !new is similar but is an instant mapchange, like what i think ur asking for, although it starts a new random map unless u use !votemap first.

    Then theres always the option of paying a little loose change to pick the next map.

    if im on the wrong lines here maybe you can explain a little better :mrgreen:

    either way post here and let me know.

    Scooby he means when you votemap and all the votes are there it dont start as the next map but it will start immetiately (Or how the fuck you will spel it)

  8. alias xiii.use { 
      if ($xiii.item($1,$2) == mapchange) { 
        if ($4 == $null) { 
          mta.pm $1 $2 Syntax error. !use <mapname> 
        } 
        var %a = $+(*,$4-,*)  
        var %b = $mta.races($1,$mta.races($1,%a)) 
        if (!%b) mta.pm $1 $2 Map not found. 
        else { 
          .write -i nextmap.ini %b 
          .write -i nextmapname.ini $mta.nick($1,$2) 
          mta.pm $1 $2 Mapchange used for %b $+ . Upcoming map: $iif($xiii.nextmap,$v1,%b) 
          hdel xiiistats item $+ $mta.nick($1,$2)  
        } 
      } 
    } 
    

    When u typ !use xD it says Mapchange used for 6. Upcoming map: 6.

  9. Yes it is

    There stand in the !kick line (dont know where)

    if ($prs.level($1,$2) > $prs.level($1,%a) {

    When you make from it

    if ($prs.level($1,$2) >= $prs.level($1,%a) {

    it must work

    You can edit this in all command like freeze kick mute ban unmute unfreeze

    But then you need to edit that rule from prs.level

×
×
  • Create New...