Jump to content

Heseam

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Heseam

  1. Witam Chciał bym dodac Obrazek do 2 skryptów w pierwszym skrypcie ma on byc gdzieś w okolicach samochodu

    Client

    function AFKShow() 
        dxDrawText(text,329.0,296.0,473.0,418.0,tocolor(255,0,0,255),5.0,"default-bold","center","center",false,false,false) 
        dxDrawText("You Are #ff0000AFK",251.0,154.0,558.0,283.0,tocolor(0,150,255,255),8.0,"default-bold","center","center",false,false,false,true) 
    end 
      
    function startCount() 
        if ( getElementData(localPlayer,"AFK") == false ) then 
            addEventHandler("onClientRender",root,AFKShow) 
            theTime = setTimer(makeCount,1000,0) 
            setElementData(localPlayer,"AFK",true) 
            text = 25 
        end 
    end 
      
    function EndCount() 
        if ( getElementData(localPlayer,"AFK") == true ) then 
            removeEventHandler("onClientRender",root,AFKShow) 
            killTimer(theTime) 
            setElementData(localPlayer,"AFK",false) 
        end 
    end 
      
    function makeCount() 
        if ( text ~= 0 ) then 
            text = text - 1 
        else 
            triggerServerEvent("onPlayerAFK",localPlayer) 
            EndCount() 
        end 
    end 
      
    addEvent("StartCount",true) 
    addEventHandler("StartCount",root, 
        function () 
            if ( source == localPlayer ) then 
                startCount() 
            end 
        end 
    ) 
      
    addEvent("EndCount",true) 
    addEventHandler("EndCount",root, 
        function () 
            if ( source == localPlayer ) then 
                EndCount() 
            end 
        end 
    ) 
    

    Server

    IdleTime = 1 -- Max Idle Time in Minutes 
    AFKTime = {} 
      
    addEvent("onPlayerAFK",true) 
    addEventHandler("onPlayerAFK",root, 
        function () 
            outputChatBox("* [ #ff0000" .. getPlayerName(source) .. " #ffffff] #0069c7Has Been Killed By #ff0000Anti AFK",root,255,255,255,true) 
            killPed(source) 
        end 
    ) 
      
    function ChackAFK(player) 
        local time = getPlayerIdleTime(player) 
        if not isPedInVehicle(player) then return end 
        if ( time > IdleTime * 60 * 1000 ) then 
            triggerClientEvent(player,"StartCount",player) 
        else 
            triggerClientEvent(player,"EndCount",player) 
        end 
    end 
      
    addEventHandler("onPlayerJoin",root, 
        function () 
            AFKTime[source] = setTimer(ChackAFK,1000,0,source) 
            setElementData(source,"AFK",false) 
        end 
    ) 
      
    addEventHandler("onPlayerQuit",root, 
        function () 
            killTimer(AFKTime[source]) 
        end 
    ) 
      
    addEventHandler("onResourceStart",resourceRoot, 
        function () 
            for i,player in ipairs(getElementsByType("player")) do 
                AFKTime[player] = setTimer(ChackAFK,1000,0,player) 
                setElementData(player,"AFK",false) 
            end 
        end 
    ) 
      
      
    

    a w Drugim po lewej stronie napisu "PRESS G TO VOTE FOR GHOSTMODE"

    Client

    local sx, sy = guiGetScreenSize() 
      
    function GMStart() 
    addEventHandler("onClientRender",getRootElement(),GmDefaultText) 
    end 
    addEvent("onGMStart",true) 
    addEventHandler("onGMStart",getRootElement(),GMStart) 
      
    function GMStop() 
    removeEventHandler("onClientRender",getRootElement(),GmDefaultText) 
    end 
    addEvent("onGMStop",true) 
    addEventHandler("onGMStop",getRootElement(),GMStop) 
      
    function GmDefaultText() 
    dxDrawText("PRESS G TO VOTE FOR GHOSTMODE",0,(567/900)*sy,(1436/1440)*sx,(669/900)*sy,tocolor(0,0,0,255),1,"bankgothic","center","center",false,false,false) 
    dxDrawText("PRESS G TO VOTE FOR GHOSTMODE",(3/1440)*sx,(570/900)*sy,(1439/1440)*sx,(672/900)*sy,tocolor(255,255,255,255),1,"bankgothic","center","center",false,false,false) 
    dxDrawText(votecount.."/"..reqPlayers.." VOTES RECIEVED",(2/1440)*sx,(633/900)*sy,(1430/1440)*sx,(707/900)*sy,tocolor(0,0,0,255),0.8,"bankgothic","center","center",false,false,false) 
    dxDrawText(votecount.."/"..reqPlayers.." VOTES RECIEVED",0,(645/900)*sy,(1439/1440)*sx,(701/900)*sy,tocolor(255,255,255,255),0.8,"bankgothic","center","center",false,false,false) 
    end 
      
    function UpdateCount(VoteCount,PlayerCount) 
    reqPlayers = PlayerCount  
    votecount = VoteCount 
    end 
    addEvent("UpdateCount",true) 
    addEventHandler("UpdateCount",getRootElement(),UpdateCount) 
      
      
      
    

    nie mam pojecia jak to zrobic:) jak by mi ktos podał komende albo przerobił te skrypty był bym wdzieczny :)

  2. zrobiłem cos takiego :

    addEvent( "gg", true ) 
        local money = getPlayerMoney ( source ) 
        if (money < 50000) then 
    end 
    function setgg () 
         setPedSkin ( source, 2 ) 
            GivePlayerMoney(playerid, -50000) 
    end 
    addEventHandler ( "gg", getRootElement(), setgg )  
    

    ale w debugscript pisze ze "bad argument 'getplayermoney'

    pomoze ktos? bo ja jestem wgle w skryptach zielony zrobiłem to troche na odczep i teraz niewiem ocb:P

×
×
  • Create New...