Jump to content

SheriFF

Members
  • Posts

    90
  • Joined

  • Last visited

About SheriFF

  • Birthday 28/11/2000

Details

  • Location
    Romania

Recent Profile Visitors

2,022 profile views

SheriFF's Achievements

Punk-@ss B*tch

Punk-@ss B*tch (12/54)

10

Reputation

  1. I love the 3d moddeling apps UI style.The corner-to-corner(or vertex) object placement is an awesome idea but can it be made to be precise(no gaps between objects)? EDIT: If not already implemented, a favorites category in object selector(which you can ofc edit) would be awesome. Dope project by the way, seems very helpful and easy-to-use
  2. Spune-mi ce va fi unic/original pe serverul tau, te rog, sau folosesti si tu un gm leaked? Off-topic : pe care*
  3. Am să fiu de-acord cu 'colegii' mei.Dacă nu ai idee cu ce se mănâncă scripting-ul nu are rost să încerci să deschizi servere pentru că nu o să ai jucători.Ți-aș propune să începi să înveți scripting pas cu pas cu resurse mici, apoi, după ce începi să te pricepi, să încerci un ditamai gm-ul complex de rp.
  4. look at the triggerClientEvent function parameters( always check the wiki before asking a question because it will help you alot )
  5. --CLIENT local headshotDamage = 200 -- damage to take when the player is shot in the head function onPlayerHeadshot( attacker, _, bodypart ) if not ( bodypart == 9 ) then return false end -- check if the player has been hit in the head if not ( getElementType( attacker ) == "player" ) then return false end -- check if the attacker is a player local playerHealth = getElementHealth( source ) -- get the player's health setElementHealth( source, playerHealth - headshotDamage ) -- set the player's new health cancelEvent() --cancel the event end addEventHandler( "onClientPlayerDamage", getRootElement(), onPlayerHeadshot )
  6. SheriFF

    Ajutor MOD

    Dacă ai deja modul clădirii( cele trei fișiere : .txd, .dff, .col ) folosește următorul script --CLIENT local COL, TXD, DFF function loadModel() COL = engineLoadCOL ( "nume_fisier.col" ) -- SCHIMBĂ nume_fisier CU NUMELE FIȘIERELOR PE CARE LE AI engineReplaceCOL ( COL, 3781--[[ ID-ul obiectului pe care vrei să-l schimbi ]] ) TXD = engineLoadTXD ( "nume_fisier.txd" ) engineImportTXD ( TXD, 3781 ) DFF = engineLoadDFF ( "nume_fisier.dff" ) engineReplaceModel ( DFF, 3781 ) end addEventHandler( "onClientResourceStart", getRootElement(), loadModel )
  7. @MrTasty @pa3ck thanks alot for your help, works just perfect <3
  8. 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 )
  9. Replace addTracer with this : function addTracer( BUTTON, STATE ) if( BUTTON == "left" and STATE == "up" ) then outputChatBox( "guns fired" ) end end addEventHandler( "onClientClick", getRootElement(), addTracer )
  10. SheriFF

    Question

    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 )
  11. 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 )
  12. Try, for example, id 128
  13. I think this can be achieved using setPedWalkingStyle function ( example : gangster walking style, gangster shooting type )
  14. 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 )
  15. 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 )
×
×
  • Create New...