Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. Yea, but what's the problem? The BindkeyFunc looks correctly, I don't see any errors in it. Insert outputChatBox function in it and check if it's running, like that local Key = "F10" BindKeyFunc = function () outputChatBox("test"); guiSetVisible(Project.Background ,not guiGetVisible(Project.Background)); showCursor(guiGetVisible(Project.Background)); end bindKey(Key,"down",BindKeyFunc); And check if 'test' message shows up on chat.
  2. Any errors in /debugscript 3? And as Tails said, make sure you've declared Project table. Project = {}
  3. What's the problem? BindKey looks fine.
  4. function OwnerCar(player) local account = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user." .. account, aclGetGroup("Owners")) then if (isElement(getElementData(player, "spawnedCar"))) then destroyElement(getElementData(player, "spawnedCar")) end local x,y,z = getElementPosition(player) local veh = createVehicle("602",x,y,z) setElementData(player, "spawnedCar", veh) end end
  5. WhoAmI

    logIn

    logIn(source ,acc, password)
  6. viewforum.php?f=104 napisz tu po angielsku:
  7. change addEventHandler ( "onClientGUIClick", button, function () ... end, false ) addEventHandler ( "onClientGUIClick", button, function () ... end, false )
  8. onPlayerLogin event with spawnPlayer function.
  9. addEventHandler ( "onClientKey", root, function ( key ) if key == "enter" then cancelEvent ( ) end end ) c-side.
  10. It's kinda easy mate, I can write it for you: local columnName = "Online time"; addEventHandler ( "onResourceStart", resourceRoot, function ( ) exports.scoreboard:scoreboardAddColumn ( columnName ); for _, player in pairs ( getElementsByType ( "player" ) ) do setElementData ( player, "global:time", getTickCount ( ) ); end end ); addEventHandler ( "onPlayerLogin", root, function ( _, account ) setElementData ( source, "global:time", getTickCount ( ) ); end ); addEventHandler ( "onPlayerQuit", root, function ( ) local time = getElementData ( source, "global:time" ); local timeSpentOnServer = ( getTickCount ( ) - time ) / 1000; local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then local data = getAccountData ( account, "global:time" ); if ( data ) then setAccountData ( account, "global:time", data + timeSpentOnServer ); else setAccountData ( account, "global:time", timeSpentOnServer ); end end end ); setTimer ( function ( ) for _, player in pairs ( getElementsByType ( "player" ) ) do local startTime = getElementData ( player, "global:time" ); if ( startTime ) then local onlineTime = ( getTickCount - startTime ) / 1000; setElementData ( player, columnName, string.format ( "%.2d:%.2d:%.2d", onlineTime / (60*60), onlineTime / 60 %6 0, onlineTime % 60 ) ); end end end, 500, 0 ); Should work. Not tested.
  11. timer = false local money = { ["wheelie"] = 10, ["stoppie"] = 20, ["2wheeler"] = 50 } addEventHandler( "onClientPlayerStuntStart", getRootElement( ), function ( stuntType ) outputChatBox( "You started stunt: " .. stuntType ); timer = setTimer ( givePlayerMoney, 1000, 0, money[stuntType] ); end ); addEventHandler( "onClientPlayerStuntFinish", getRootElement( ), function ( stuntType, stuntTime, distance ) if isTimer ( timer ) then killTimer ( timer ) end end );
  12. I can't understand. Just download file after loging, or spawning and after load it like above.
  13. Just put those files in meta with attribute 'download="false" ', and then download them when you want by using downloadFile.
  14. Of course it is. Just you have to collect all the vehicle's images and put them into one folder. Then, you have to draw them using dxDrawImage or create them with GUI function guiCreateStaticImage.
  15. If you are creating this function in another resource you have to call it like that exports.gang_system:isGangMember
  16. Have you created 'isGangMember' function?
  17. WhoAmI

    [HELP] Shader

    c-side addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) triggerServerEvent ( "loadForAll", localPlayer ); end ); addEvent ( "load", true ) addEventHandler ( "load", root, function ( ) local vehicle = getOccupiedVehicle ( source ) local Shader = dxCreateShader( "shader.fx" ) local Texture = dxCreateTexture( "mavericktexture.png" ) dxSetShaderValue( Shader, "Tex", Texture ) engineApplyShaderToWorldTexture( Shader, "Bell_206B_T", vehicle ) end ); s-side addEvent ( "loadForAll", true ) addEventHandler ( "loadForAll", root, function ( ) triggerClientEvent ( "load", source ); end );
  18. colRec = createColRectangle (-1203.599609375, 2814.75, 500,500) colRad = createRadarArea (-782.689453125, 656.4794921875, 1700,2200,0,0,0,100) addEventHandler ( "onClientPlayerDamage", localPlayer, function (attacker) if isElement ( attacker ) and getElementType ( attacker ) == "player" then if isElementWithinColShape ( source, colRec ) then cancelEvent () end end end )
  19. colRec = createColRectangle (-1203.599609375, 2814.75, 500,500) colRad = createRadarArea (-782.689453125, 656.4794921875, 1700,2200,0,0,0,100) addEventHandler ( "onClientPlayerDamage", localPlayer, function (attacker) if getElementType ( attacker ) == "player" then if isElementWithinColShape ( source, colRec ) then cancelEvent () end end end )
  20. string.gsub ( self.edit.text, ".", "*" )
  21. WhoAmI

    Module

    https://wiki.multitheftauto.com/wiki/Modules
  22. WhoAmI

    Module

    What do you mean by 'module level'?
  23. viewtopic.php?f=114&t=48868
×
×
  • Create New...