*BeaT*

Members
  • Content count

    83
  • Joined

  • Last visited

Community Reputation

9 Neutral

About *BeaT*

  • Rank
    Transformer
  • Birthday 28/11/00

Details

  • Gang
    Ciucago Boyz
  • Location
    Romania
  • Occupation
    Mapper, Modder, Scripter

Recent Profile Visitors

538 profile views
  1. help

    @MrTasty @pa3ck thanks alot for your help, works just perfect <3
  2. What i am trying to make is a character creator system where the stats as age, height and weight must be selected using a scrollbar.The problem is that i can't think of an algorithm to do this Example : at the height scrollbar the player can choose between 150 and 250 cm. I need an algorithm to work with the guiScrollBarGetScrollPositon and transform it in a value between 150 and 250, how can i do this? ( a general formula would help alot )
  3. Replace addTracer with this : function addTracer( BUTTON, STATE ) if( BUTTON == "left" and STATE == "up" ) then outputChatBox( "guns fired" ) end end addEventHandler( "onClientClick", getRootElement(), addTracer )
  4. getResources() -- with this function you get all the resources triggerClientEvent() --to send the resources to the client --[[ Example ( NOT TESTED ) ]] --SERVER function getAllResources() local RES_TABLE = getResources() if not ( RES_TABLE and type( RES_TABLE ) == "table" ) then --output an error return false end triggerClientEvent( source --[[ change source with your player element ]], "client.sendResources", source --[[ same here ]], RES_TABLE ) end --here add an event/command handler --CLIENT addEvent( "client.sendResources", true ) -- add the cliend-sided event function resNames_guiElements( RES_TABLE ) local COLUMN_WIDTH = 50 --Gridlist initialisation GRIDLIST = guiCreateGridList( --[[ fill here with the parameters ]] ) guiGridListAddColumn( GRIDLIST, "Resources", COLUMN_WIDTH ) for _, RESOURCE in ipairs ( RES_TABLE ) do -- Create the rows with the resources names local RES_NAME = getResourceName( RESOURCE ) guiGridListAddRow( GRIDLIST, RES_NAME ) end end addEventHandler( "client.sendResources", getRootElement(), resNames_guiElements )
  5. Please post the full script because, for example, prize is not declared Second, you don't have line 17 in your posted script Please tell us what the command is supposed to do( how it should work )
  6. Try, for example, id 128
  7. I think this can be achieved using setPedWalkingStyle function ( example : gangster walking style, gangster shooting type )
  8. This is just another idea( not tested ) , feel free to use and edit it as you wish --SERVER addEventHandler( "onPlayerSpawn", getRootElement(), function () triggerClientEvent( source, "player_onSpawn", source ) end ) --CLIENT addEvent( "player_onSpawn", true ) local SHOW_DIST = 50 local TAG_RADIUS = createColSphere( 0, 0, 0, SHOW_DIST ) function initialiseNametags() attachElements( TAG_RADIUS, localPlayer, 0, 0, 0 ) addEventHandler( "onClientRender", getRootElement(), renderNametags ) end addEventHandler( "player_onSpawn", getRootElement(), initialiseNametags ) local TAG_WIDTH, TAG_HEIGHT = 300, 50 function renderNametags() local CAM_X, CAM_Y, CAM_Z = getCameraMatrix() local PLAYERS_IN_RADIUS = getElementsWithinColShape( TAG_RADIUS, "player" ) for _, PLAYER in pairs ( PLAYERS_IN_RADIUS ) do local PLAYER_X, PLAYER_Y, PLAYER_Z = getElementPosition( PLAYER ) if isLineOfSightClear( PLAYER_X, PLAYER_Y, PLAYER_Z, CAM_X, CAM_Y, CAM_Z, true, false, false, true, false, false, localPlayer ) then local BONE_X, BONE_Y, BONE_Z = getPedBonePosition( PLAYER, 5 ) local TAG_X, TAG_Y = getScreenFromWorldPosition( BONE_X, BONE_Y, BONE_Z + 0.3 ) if ( TAG_X and TAG_Y ) then dxDrawText( getPlayerName( PLAYER ), TAG_X - TAG_WITH / 2, TAG_Y - TAG_HEIGHT / 2, TAG_X - TAG_WITH / 2 + TAG_WITH, TAG_Y - TAG_HEIGHT / 2 + TAG_HEIGHT, tocolor( 150, 50, 0 ), 1, "bankgothic" ) end end end end One mistake i saw was at dxDrawText.For example, if you want to draw a text at coords 10, 10 with the height of 50 and width of 100 you need to write something like dxDrawText( "text", 10, 10, 110, 60 ... ) ( the right and bottom must be coords, not the width and height )
  9. As i heard before( not sure tho ), a weapon doesn't represent a physical object like a ped or an object and a shader can't be applied to it. The solution here( if possible ) is to create a custom weapon system which uses actual objects as weapons ( engineApplyShaderToWorldTexture's optional arguments )
  10. Why don't you just uprgade your mta to the lastest version ( MTA:SA 1.5.4 ) ? It offers the possibility to play the race gamemode and alot of other cool gamemodes and it's map editor is veri stable
  11. That security thing is the part of the bottom land.Use 'Select world model' tool and check it by yourself
  12. Just use these functions createColCuboid() -- or any col shape "onColShapeHit" --event --example( not tested ) colShape = createColCuboid( --[[ fill here with the parameters ]] ) addEventHandler( "onColShapeHit", colShape, function( hitElement, dimension ) if not ( dimension ) then return false end if( isElement( hitElement) and getElementType( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if not( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then --teleport out of the colshape end end end )
  13. Event parameters addEventHandler ( "onPlayerVehicleExit", getRootElement(), function ( vehicle, seat, jacked ) if getVehicleType(theVehicle) == "Train" then detachTrailerFromVehicle(theVehicle) end end, )
  14. Use attachTrailerToVehicle function
  15. Fixed, fully functional code( thanks @ZoRRoM for the idea ) here function db_executeCommand( COMMAND, ... ) local VARS_TABLE = { ... } local DB_EXEC if ( VARS_TABLE and #VARS_TABLE > 0 ) then DB_EXEC = dbExec( DATABASE_CONNECTION, COMMAND, unpack( VARS_TABLE ) ) else DB_EXEC = dbQuery( DATABASE_CONNECTION, COMMAND ) end if not ( DB_EXEC ) then return false end return true end