-
Posts
1,248 -
Joined
-
Last visited
Everything posted by WhoAmI
-
You're welcome, bro.
-
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.
-
Any errors in /debugscript 3? And as Tails said, make sure you've declared Project table. Project = {}
-
What's the problem? BindKey looks fine.
-
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
-
viewforum.php?f=104 napisz tu po angielsku:
-
change addEventHandler ( "onClientGUIClick", button, function () ... end, false ) addEventHandler ( "onClientGUIClick", button, function () ... end, false )
-
onPlayerLogin event with spawnPlayer function.
-
addEventHandler ( "onClientKey", root, function ( key ) if key == "enter" then cancelEvent ( ) end end ) c-side.
-
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.
-
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 );
-
I can't understand. Just download file after loging, or spawning and after load it like above.
-
Just put those files in meta with attribute 'download="false" ', and then download them when you want by using downloadFile.
-
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.
-
If you are creating this function in another resource you have to call it like that exports.gang_system:isGangMember
-
Have you created 'isGangMember' function?
-
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 );
-
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 )
-
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 )
-
string.gsub ( self.edit.text, ".", "*" )
-
https://wiki.multitheftauto.com/wiki/Modules
-
What do you mean by 'module level'?
-
viewtopic.php?f=114&t=48868