Jump to content

CowTurbo

Members
  • Posts

    385
  • Joined

  • Last visited

Posts posted by CowTurbo

  1. Usuly, we are not making requests, but, i made you reeaaallyy start beta, so you have to go on with it by your own, i added much things what you didnt wanted, such as money give 200 - 600, so you have to find it and edit it by you own, and some parts i wasnt added, such as if skin is 28 ..

    I wasnt added them because you can learn then, by editing this script. I hope you can finish with it, good luck ;)

    -- CLIENT -- 
      
    --[[ 
      
         ::..* Robbing System * ::.. 
      
    ]] 
      
    local robingMarkers = {} 
    local robingStartMarkers = {} 
    local robbingBlips = {} 
      
    robingStartMarkers[1] = createMarker(0,0,3, 'cylinder',1.5, 200,200,200,150 ) 
      
    function onConnectAndStart () 
        setElementData ( getLocalPlayer(), "Robbing", false ) 
    end 
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), onConnectAndStart ) 
      
    function startMarkerHit (hitPlayer, matchingDim) 
        for index,markers in pairs(robingStartMarkers) do 
        if (source == markers) then 
         if not ( getPedOccupiedVehicle ( getLocalPlayer() )) then 
          
         startRobbing () 
        else 
        outputChatBox ( "* ERROR: Please come out from your vehicle to start robbing!", 255,0,0 ) 
       end 
      end 
     end 
    end 
    addEventHandler ( "onClientMarkerHit", getRootElement(), startMarkerHit ) 
      
    function startRobbing () 
        if not ( getElementData ( getLocalPlayer(), "Robbing" )) == true then 
        robingMarkers[1] = createMarker(2,0,3, 'cylinder',1.5, 200,200,200,150 ) 
        robingMarkers[2] = createMarker(4,0,3, 'cylinder',1.5, 200,200,200,150 ) 
        robingMarkers[3] = createMarker(6,0,3, 'cylinder',1.5, 200,200,200,150 ) 
       -- create here markers where have to be robing markers  
        robbingBlips[1] = createBlip (2, 0, 3, 32, 2 ) 
        robbingBlips[2] = createBlip (4, 0, 3, 32, 2 ) 
        robbingBlips[3] = createBlip (6, 0, 3, 32, 2 ) 
        -- create here robbing Blips 
        addEventHandler ( "onClientMarkerHit", getRootElement(), robMarkerHit ) 
        else 
        outputChatBox ( "* ERROR: You already robbing!", 255,0,0 ) 
        end 
    end 
         
    function robMarkerHit (hitPlayer, matchingDim) 
        for index,markers in pairs(robingMarkers) do 
        if (source == markers) then 
         if not ( getPedOccupiedVehicle ( getLocalPlayer() )) then 
        triggerServerEvent ( "addStar", getLocalPlayer()) 
        triggerServerEvent ( "addMoney", getLocalPlayer()) 
        else 
        outputChatBox ( "* ERROR: Please come out from your vehicle to start robbing!", 255,0,0 ) 
       end 
      end 
     end 
    end 
    addEventHandler ( "onClientMarkerHit", getRootElement(), robMarkerHit ) 
      
    function stopRobbing (commandName) 
        for i,v in pairs ( robingMarkers ) do 
        destroyElement ( v ) 
        end 
        for i,v in pairs ( robbingBlips ) do 
        destroyElement ( v ) 
        end 
    end 
      
    -- server -- 
      
    function addStar ( ) 
        local wanted = getPlayerWantedLevel ( source ) 
        if not ( wanted == 6 ) then 
        setPlayerWantedLevel ( source, wanted+1 ) 
        end 
    end 
    addEvent ( "addStar", true ) 
    addEventHandler ( "addStar", getRootElement(), addStar ) 
      
    function addMoney ( ) 
        local money = math.random(200,600) 
        givePlayerMoney ( source, math.random(200,600) 
        outputChatBox ( "* INFO: Well done, you robbed house and earned "..money.."$ ! Go on with robbing and earn money!", source, 0,255,0 ) 
        end 
    end 
    addEvent ( "addMoney", true ) 
    addEventHandler ( "addMoney", getRootElement(), addMoney ) 
    

  2. it will show ur script erros. Try, go in game, login with admin account, and write to chatbox /debugscript 3

    Now you can see a small window down your screen, There will come errors, like to console ( black window, deffault ) but debugscript can show you errors what console cant.

  3. It shouldn't take long to load or lag very much at all if you only load up one or two areas. If you know roughly where your object is - say, somewhere in eastern San Fierro - loading just SFe and SFse should be enough to find your object. Indeed if you load up every single IPL it will take time to load and will rape your system.

    yeap. thx =)

  4. [/lua]

    function iamAdmin()

    local account = getPlayerAccount(source)

    if not account then return end

    local accountName = getAccountName(source)

    if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then

    setPlayerNametagText (source, "{JWORLD}..getPlayerName(source))

    setPlayerTeam (source, teamA)

    ouputChatBox ("* INFO: Admin have logged in!")

    end

    if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Moderator" ) ) then

    setPlayerNametagText (source, "{JWORLDMOD}..getPlayerName(source))

    setPlayerTeam (source, teamM)

    ouputChatBox ("" INFO: Moderator have logged in!")

    end

    end

    addEventHandler("onPlyerLogin", getRootElement(), iamAdmin)[/lua]

    when you chat, then you will see the tag,

×
×
  • Create New...