Jump to content

fixed


opnaiC

Recommended Posts

Server -

    local groveSkin = { [106]=true, [105]=true, [107]=true, [271]=true, [270]=true } 
      
      
    function skin () 
      local thePlayer = client 
        local fac = getElementData(thePlayer,"Faction") or 0 
        local rank = getElementData(thePlayer,"Rank") or 0 
     if thePlayer and isElement(thePlayer) then  
        if (tonumber(fac) == 1) then 
            if (tonumber(rank) == 1) then   
                setElementModel(thePlayer,105) 
            elseif (tonumber(rank) == 2) then 
                setElementModel(thePlayer,105) 
            elseif (tonumber(rank) == 3) then   
                setElementModel(thePlayer,106) 
            elseif (tonumber(rank) == 4) then 
                setElementModel(thePlayer,107) 
            elseif (tonumber(rank) == 5) then   
                setElementModel(thePlayer,271) 
            elseif (tonumber(rank) == 6) then 
                setElementModel(thePlayer,270)         
            end 
        end 
     end 
    end 
    addEvent ("skin", true) 
    addEventHandler ("skin", root, skin) 
      
      
    function givewaffe () 
      local thePlayer = client 
      local fac = getElementData(thePlayer,"Faction") or 0 
      local rank = getElementData(thePlayer,"Rank") or 0 
     if thePlayer and isElement(thePlayer) then 
      if (tonumber(fac) == 1) then 
       if (tonumber(rank) == 1) then 
         giveWeapon (thePlayer, 5, 1) 
       elseif (tonumber(rank) == 2) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
       elseif (tonumber(rank) == 3) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
       elseif (tonumber(rank) == 4) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
         giveWeapon (thePlayer, 32, 1) 
       elseif (tonumber(rank) == 5) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
         giveWeapon (thePlayer, 32, 1) 
       elseif (tonumber(rank) == 6) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
         giveWeapon (thePlayer, 32, 1) 
       end 
      end 
     end 
    end 
    addEvent ("weapon", true) 
    addEventHandler ("weapon", root, givewaffe) 
      
      
    function money () 
      local thePlayer = client 
        local fac = getElementData(thePlayer,"Faction") or 0 
        local rank = getElementData(thePlayer,"Rank") or 0 
        if (tonumber(fac) == 1) then 
            if (tonumber(rank) == 1) then   
                givePlayerMoney (200, thePlayer) 
                outputChatBox ("Вам зачислена зарплата - 200$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 2) then 
                givePlayerMoney(thePlayer,250) 
                outputChatBox ("Вам зачислена зарплата - 250$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 3) then   
                givePlayerMoney(thePlayer,350) 
                outputChatBox ("Вам зачислена зарплата - 350$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 4) then 
                givePlayerMoney(thePlayer,450) 
                outputChatBox ("Вам зачислена зарплата - 450$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 5) then   
                givePlayerMoney(thePlayer,550) 
                outputChatBox ("Вам зачислена зарплата - 550$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 6) then 
                givePlayerMoney(thePlayer,700) 
                outputChatBox ("Вам зачислена зарплата - 700$", thePlayer, 0,191,255)           
            end 
        end 
    end 
    setTimer (money, 3600000, 1) 
      
    vehicle1 = createVehicle (492, 2509.3999, -1669.4, 13.3, 0, 0, 0, "Grove 01") 
    setVehicleColor( vehicle1, 0,128,0 ) 
    vehicle2 = createVehicle (492, 2507.2, -1677.4, 13.4, 0, 0, 330, "Grove 02") 
    setVehicleColor( vehicle2, 0,128,0 ) 
    vehicle3 = createVehicle (482, 2501, -1682.3, 13.6, 0, 0, 295, "Grove 03") 
    setVehicleColor( vehicle3, 0,128,0 ) 
    vehicle4 = createVehicle (600, 2493.1001, -1683.8, 13.2, 0, 0, 270, "Grove 04") 
    setVehicleColor( vehicle4, 0,128,0 ) 
      
    function respawn1 () 
    setTimer (function () 
    respawnVehicle (vehicle1) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn1) 
      
    function respawn2 () 
    setTimer (function () 
    respawnVehicle (vehicle2) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn2) 
      
    function respawn3 () 
    setTimer (function () 
    respawnVehicle (vehicle3) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn3) 
      
    function respawn4 () 
    setTimer (function () 
    respawnVehicle (vehicle4) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn4) 
      
      

Rank thing

    function rankMySelf () 
        local thePlayer = client 
        local account = getPlayerAccount(thePlayer) 
        if account and not isGuestAccount(account) then 
            local accName = getAccountName (account) 
            local oFaction = getElementData(thePlayer, "Faction") or 0 
            if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
                if tonumber(oFaction) == 0 then 
                    setElementData(thePlayer, "Faction", 1) 
                    setElementData(thePlayer, "Rank", 6) 
                    outputChatBox ("working", thePlayer) 
                end 
            end 
        end 
    end 
    addCommandHandler( "rankme", rankMySelf) 

Link to comment
Server -
    local groveSkin = { [106]=true, [105]=true, [107]=true, [271]=true, [270]=true } 
      
      
    function skin () 
      local thePlayer = client 
        local fac = getElementData(thePlayer,"Faction") or 0 
        local rank = getElementData(thePlayer,"Rank") or 0 
     if thePlayer and isElement(thePlayer) then  
        if (tonumber(fac) == 1) then 
            if (tonumber(rank) == 1) then   
                setElementModel(thePlayer,105) 
            elseif (tonumber(rank) == 2) then 
                setElementModel(thePlayer,105) 
            elseif (tonumber(rank) == 3) then   
                setElementModel(thePlayer,106) 
            elseif (tonumber(rank) == 4) then 
                setElementModel(thePlayer,107) 
            elseif (tonumber(rank) == 5) then   
                setElementModel(thePlayer,271) 
            elseif (tonumber(rank) == 6) then 
                setElementModel(thePlayer,270)         
            end 
        end 
     end 
    end 
    addEvent ("skin", true) 
    addEventHandler ("skin", root, skin) 
      
      
    function givewaffe () 
      local thePlayer = client 
      local fac = getElementData(thePlayer,"Faction") or 0 
      local rank = getElementData(thePlayer,"Rank") or 0 
     if thePlayer and isElement(thePlayer) then 
      if (tonumber(fac) == 1) then 
       if (tonumber(rank) == 1) then 
         giveWeapon (thePlayer, 5, 1) 
       elseif (tonumber(rank) == 2) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
       elseif (tonumber(rank) == 3) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
       elseif (tonumber(rank) == 4) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
         giveWeapon (thePlayer, 32, 1) 
       elseif (tonumber(rank) == 5) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
         giveWeapon (thePlayer, 32, 1) 
       elseif (tonumber(rank) == 6) then 
         giveWeapon (thePlayer, 5, 1) 
         giveWeapon (thePlayer, 24, 1) 
         giveWeapon (thePlayer, 32, 1) 
       end 
      end 
     end 
    end 
    addEvent ("weapon", true) 
    addEventHandler ("weapon", root, givewaffe) 
      
      
    function money () 
      local thePlayer = client 
        local fac = getElementData(thePlayer,"Faction") or 0 
        local rank = getElementData(thePlayer,"Rank") or 0 
        if (tonumber(fac) == 1) then 
            if (tonumber(rank) == 1) then   
                givePlayerMoney (200, thePlayer) 
                outputChatBox ("Вам зачислена зарплата - 200$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 2) then 
                givePlayerMoney(thePlayer,250) 
                outputChatBox ("Вам зачислена зарплата - 250$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 3) then   
                givePlayerMoney(thePlayer,350) 
                outputChatBox ("Вам зачислена зарплата - 350$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 4) then 
                givePlayerMoney(thePlayer,450) 
                outputChatBox ("Вам зачислена зарплата - 450$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 5) then   
                givePlayerMoney(thePlayer,550) 
                outputChatBox ("Вам зачислена зарплата - 550$", thePlayer, 0,191,255) 
            elseif (tonumber(rank) == 6) then 
                givePlayerMoney(thePlayer,700) 
                outputChatBox ("Вам зачислена зарплата - 700$", thePlayer, 0,191,255)           
            end 
        end 
    end 
    setTimer (money, 3600000, 1) 
      
    vehicle1 = createVehicle (492, 2509.3999, -1669.4, 13.3, 0, 0, 0, "Grove 01") 
    setVehicleColor( vehicle1, 0,128,0 ) 
    vehicle2 = createVehicle (492, 2507.2, -1677.4, 13.4, 0, 0, 330, "Grove 02") 
    setVehicleColor( vehicle2, 0,128,0 ) 
    vehicle3 = createVehicle (482, 2501, -1682.3, 13.6, 0, 0, 295, "Grove 03") 
    setVehicleColor( vehicle3, 0,128,0 ) 
    vehicle4 = createVehicle (600, 2493.1001, -1683.8, 13.2, 0, 0, 270, "Grove 04") 
    setVehicleColor( vehicle4, 0,128,0 ) 
      
    function respawn1 () 
    setTimer (function () 
    respawnVehicle (vehicle1) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn1) 
      
    function respawn2 () 
    setTimer (function () 
    respawnVehicle (vehicle2) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn2) 
      
    function respawn3 () 
    setTimer (function () 
    respawnVehicle (vehicle3) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn3) 
      
    function respawn4 () 
    setTimer (function () 
    respawnVehicle (vehicle4) 
    end, 3000,1) 
    end 
    addEventHandler ("onVehicleExplode", root, respawn4) 
      
      

Rank thing

    function rankMySelf () 
        local thePlayer = client 
        local account = getPlayerAccount(thePlayer) 
        if account and not isGuestAccount(account) then 
            local accName = getAccountName (account) 
            local oFaction = getElementData(thePlayer, "Faction") or 0 
            if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
                if tonumber(oFaction) == 0 then 
                    setElementData(thePlayer, "Faction", 1) 
                    setElementData(thePlayer, "Rank", 6) 
                    outputChatBox ("working", thePlayer) 
                end 
            end 
        end 
    end 
    addCommandHandler( "rankme", rankMySelf) 

1csmZOp.png

When I type in /rankme

Link to comment

Oh I'm sorry didn't read it right

        function rankMySelf (thePlayer) 
            local account = getPlayerAccount(thePlayer) 
            if account and not isGuestAccount(account) then 
                local accName = getAccountName (account) 
                local oFaction = getElementData(thePlayer, "Faction") or 0 
                if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
                    if tonumber(oFaction) == 0 then 
                        setElementData(thePlayer, "Faction", 1) 
                        setElementData(thePlayer, "Rank", 6) 
                        outputChatBox ("working", thePlayer) 
                    end 
                end 
            end 
        end 
        addCommandHandler( "rankme", rankMySelf) 

Link to comment
Oh I'm sorry didn't read it right
        function rankMySelf (thePlayer) 
            local account = getPlayerAccount(thePlayer) 
            if account and not isGuestAccount(account) then 
                local accName = getAccountName (account) 
                local oFaction = getElementData(thePlayer, "Faction") or 0 
                if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
                    if tonumber(oFaction) == 0 then 
                        setElementData(thePlayer, "Faction", 1) 
                        setElementData(thePlayer, "Rank", 6) 
                        outputChatBox ("working", thePlayer) 
                    end 
                end 
            end 
        end 
        addCommandHandler( "rankme", rankMySelf) 

ty dude

Link to comment
Oh I'm sorry didn't read it right
        function rankMySelf (thePlayer) 
            local account = getPlayerAccount(thePlayer) 
            if account and not isGuestAccount(account) then 
                local accName = getAccountName (account) 
                local oFaction = getElementData(thePlayer, "Faction") or 0 
                if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
                    if tonumber(oFaction) == 0 then 
                        setElementData(thePlayer, "Faction", 1) 
                        setElementData(thePlayer, "Rank", 6) 
                        outputChatBox ("working", thePlayer) 
                    end 
                end 
            end 
        end 
        addCommandHandler( "rankme", rankMySelf) 

Also have a question:

Do you know how I can save the skin before I hit the marker ?

As example when the player has allready hit the marker and get the skin and when hi hits again the marker he get his old skin

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...