Jump to content

Salem

Members
  • Content Count

    75
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Salem

  • Rank
    Transformer

Details

  • Gang
    FG

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Salem

    Editor help

    Thanks, but the problem is I don't want to reset my config. If I do so it works, but when I change some bind (even one) it either works as previous set or doesn't at all. It looks like some major bug as some kind of conflict between game binds, mta binds and/or editor binds. Don't have time to investigate so must work with some half-solutions. Maybe I should delete all hardcoded binds from script but it wouldn't be this.
  2. Hi. I have something like this: addCommandHandler( 'wrem', function( player, command, radius ) if radius then radius = tonumber( radius ) else radius = 10 end local t = false; local x,y,z = getElementPosition( player ) for i=500,20000 do t = removeWorldModel( i,radius, x, y, z ) if t == true then outputChatBox( "[WREM] First object found: model "..i..", radius "..radius, player ) break end end outputChatBox( "[WREM] Done.", player ) end ) This function should return first met object but it returns true for every ite
  3. Salem

    Editor help

    I tried. Still no response. Only movement doesn't work.
  4. Salem

    Editor help

    I've updated the MTA. Could anyone tell me why I can't move camera in map editor? Everything else seems to work. I restared few times, changed binds, whatever, but this ersatz don't want to cooperate.
  5. Thanks for this suggestion - it's probably the only way to do this, so I did as follows: function to check is target on via camera: function isTargetingActivated( ) local slot = getPedWeaponSlot( me ) if getPedWeapon( me, slot ) == 43 then outputDebugString( "you have camera dude" ) return true else outputDebugString( "wrong tool dude" ) return false end end addEventHandler( "onClientPlayerTarget", getRootElement(), isTargetingActivated ) and to release the cilium: function tryMakePhoto( button, press ) if (
  6. How to get the only one weapon I currently use? This function returns all weapons I have in all slots. Ok, found it: int getPedWeaponSlot ( ped thePed )
  7. Do you know how to get names of functions. There are numbers like objects data. The letter keys are not returned. I mean, I need a list like in menu -> binds. This function is promising but doesn't work for me. I mean, I'm asking because want to use something like this: function playerPressedKey( button, press ) local boundKey = getKeyBoundToFunction( 'horn' ); if button == boundKey then if ( press ) then ACTION = false outputDebugString( "You pressed the "..button.." key!" ) end end end addEventHandler( "onClientKey", root
  8. So I guess this starting event doesn't work properly. I think I haven't got any instead. However, On wiki is written: OnClientPlayerWeaponFire This event is called when a player fires a weapon. This does not trigger for projectiles, melee weapons, or camera. But in my case it triggers the camera but probably after the clip. So that's why the images are not sharp. Any ideas?
  9. Thanks for replying. Honestly, my last solution works. The only error was (which I didn't visualize) in getRealDateTimeNowString function. It had : characters in string. Now it's ok. I've corrected typo and changed fileWrite( newFile, pixels ) The file is written to local resource. local newFile = fileCreate( iname..".jpg" ) Now, the problem is the jpegs are horrible comparing with manual screenshots. The camerea targets are on and flash glows the screen. It seems like trigger is too late. I can't set up timer with negative values.
  10. I'm trying to save it directly: addEvent( "onPlayerScreenShot", true ) addEventHandler ( "onPlayerScreenShot", getRootElement(), function( theResource, status, pixels, timestamp, tag ) if status == "ok" then local iname = tag.."_"..getRealDateTimeNowString(); outputDebugString( "[IMAGE] "..iname ) local newFile = fileCreate( "e:/"..iname..".jpg" ) -- attempt to create a new file if ( newFile ) then -- check if the creation succeeded fileWrite( newFile, "This is a test file!"
  11. Hi. I try to save screenshot on disk taken by player. Following the only wiki help I have below functions. on client: addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), function( weapon, _, _, _, _, _, element ) if ( weapon == 43 ) then -- camera triggerServerEvent( "sendScreenShot", getLocalPlayer(), scrX, scrY ); end end ); it's ok, sends data to the server, but: addEvent( "sendScreenShot", true ) addEventHandler ( "sendScreenShot", getRootElement(), function( scrX, scrY ) local name = getPlayerName( source ) takePlayerScr
  12. Fixed some resolution problem. http://www7.zippyshare.com/v/yKhIPo3L/file.html
  13. Hi. I've done little game. It's not GTA mirror but very simplistic simulator. I guess it's playable (for me surely) so enjoy if you want. Just couldn't find anything like this. Read the guide for some info. (I can't login to mta resources so post it here) Image: https://imgur.com/a/sMaEg Link: http://www118.zippyshare.com/v/bTtCDMtX/file.html Merry Christmas!
  14. I don't understand why ped[1][1] works if it's in one place (like in code above) but doesn't when calling from other function (nor ped[1] doesn't). the table is global variable in server-side script and I've used such approach earlier in my scripts and it was ok, but here is not. I really don't know what gremlin is in my code. It looks like initializing this table ( taxidf = { { } } ) in one function doesn't save it on global scope. But in all previous scripts it was ok. The only difference here is that I put objects inside not values. Can it be a bug? What kind? Maybe I have some baby mistake
×
×
  • Create New...