Jump to content

Karuzo

Members
  • Posts

    1,213
  • Joined

  • Last visited

Everything posted by Karuzo

  1. No, i know you can't do it. And i just want to help you. you could set yourself to developmode to see the colshape.
  2. First, i didn't said that you should use 100. it was just an EXAMPLE. I don't know how big the farm is .
  3. LOL What do you think am i doin' at this moment ? You just don't want to understand me. there is no parameter like x2 or y2. you should delete them and just set x1 = ... y1 = ... bigCol = createColRectangle(x1, y1,100, 100)
  4. Could you please read the wiki ?
  5. lol, there is no fx2 or smth like that. Did you even read the wiki ? delete the x2 and y2, and the width height for e.g.: 100,10 ...
  6. Why do you add x1, y1,x2,y2 ?
  7. Then show us your script.
  8. https://wiki.multitheftauto.com/wiki/CreateColRectangle
  9. Karuzo

    Any Proplem

    What doesn't work ?
  10. https://luac.multitheftauto.com/ Just click on the Encyrpt from 1.3.4.
  11. You know that he didn't asked for that? He says that it doesn't detect rocket launchers and so on.
  12. Use guiGetTex for it. local currentDrugs = getElementData(localPlayer, "drugs") or 0 editbox = guiCreateEditBox(.....) drugss = guiGetTex(editbox) setElementData(localPlayer, "drugs", currentDrugs+drugss) Wrote this on the phone.
  13. Just use cache="false"... for client scripts.
  14. What ? I don't understand you.
  15. Karuzo

    video.....

    viewtopic.php?f=91&t=70526 Do you mean Videos or Something like an Intro ?
  16. You made a typo in the serverside. 'kikcplayer'
  17. Karuzo

    help me

    I think he wants a intro like SAUR or Something like that.
  18. Karuzo

    help me

    Basically you could do this with setCameraMatrix --and setTimer
  19. Karuzo

    Save Playtime

    Thank you your code works
  20. Karuzo

    Save Playtime

    No Way to save it with elementdatas like with onResourceStart or smth like that ? And what about this problem: //EDIT: Fixed ^this problem. But i can't save it.
  21. Karuzo

    Save Playtime

    Hey Guys, I wanted to get the playtime of the player if the resource restarts and save it if the resource will be stopped, i've found this resource in the community: but idk which event i should use to save it. Maybe someone could help me ? //EDIT: And if one minute is over it goes to the Minute Section, e.g: 00:23:1 ( it stays 1, this is the seconds section, and 23 is now the seconds section but that should be minutes, why ? )) Client: local playtime = tostring(getElementData(player, "Online Time")) or 0--This is how i get it and put it in my scoreboard(i use my scoreboard not the normal one.) Server: local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "Online Time", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'Online Time' ) setAccountData ( playeraccount, "Online Time", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "Online Time" ) if ( time ) then setElementData ( source, "Online Time", time ) else setElementData ( source, "Online Time",0 ) setAccountData ( playeraccount, "Online Time",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
  22. Math is not really my friend, could you please tell me what i need for that ?
  23. How ? There is no rotation argument on dxDrawRectangle i think. @pa3ck: Thank you! @Blaawee: how do you mean that ?
×
×
  • Create New...