Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. tosfera

    mta sdk

    Are you sure you're still using the right information while trying to connect? The wiki has this as an example; include( "mta_sdk.php" ); $mtaServer = new mta("example.com", 33004, "myUsername", "myPassword" ); $mtaServer->getResource("someResource")->call("someFunction");
  2. As default, yes. You can use dxCreateFont to create any font you wish. No idea on the font though, try one of these online font scanners. Take a screenshot and upload one of the text images in there to see if they know which one it is.
  3. Remove line 4 and it sure is correct.
  4. Set a timer yourself, when the timer runs out don't provide an animation block-name to reset it. setPedAnimation ( source ) You can also try to use the 'freezeLastFrame' parameter, add 1 false to your line.
  5. You're in the wrong section, yet I'm still going to explain it to you. You're able to create an image by using some PHP functions or even some javascript to make it easier. You should use PHP though.. by doing so, you can create a script on your site that takes the serial of a player and generates an image with data containing on it. Users will be able to embed these images in their signature. If you want some more information about that, you should google for; "create an image with text overlay php". This should get you started.
  6. tosfera

    Model ID

    easy tip; start a map editor, select the "world object" option in the tray of icons and hover over it. If you can't hover over it, try to enable the low mesh mode ( e, if I'm not mistaken ) and try again. If you still can't hover it / select it. The object either has no collision or it's part of some big interior thing. Like Rockstar did for a lot of things.
  7. To get it working on the client side, or just for the client ( however you want to say it ), you have to make the command client-sided. Add it in a client-sided file ( a file which has type="client" in the meta.xml ) and try it again.
  8. tosfera

    mta sdk

    Why did you change the port to 80? Why did you disable the httpserver? What sdk are you using (php, javascript)? did it work before?
  9. ProcessLineOfSight returns the surface X, Y, Z if it hasn't been hit by anything else. If you got those positions, you're able to use GetScreenFromWorldPosition and dxDrawImage to draw the position on the right location.
  10. tosfera

    Silenced gun

    I would assume that's the distance of the gun's reach. Think about a rocket, the distance it takes before it explodes. Same goes for a simple gun, to limit the range it can reach.
  11. try this; local Door4 = createObject(980,2087.5,1433.1999511719,12.300000190735,0,359.75,89.499969482422) local markerDoor4 = createMarker(2088.3000488281,1433.3000488281,9.8000001907349,'cylinder',8,0,0,0,0) addEventHandler('onMarkerHit',markerDoor4, function ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( getPedOccupiedVehicle ( hitElement ) ) then moveObject(Door4,1000,2087.5,1433.1999511719,7.1999998092651) end end end )
  12. As the wiki states; "Canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead.", you should use the event onClientPlayerDamage to cancel it.
  13. I like how your lack of knowledge fails you to give the correct answer to a person the entire community refuses to help since the entire community refuses to help people with leaked resources. I'll pm you the answer for his "problem".
  14. tosfera

    Saving problem

    try this; addEventHandler( 'onPlayerWasted', root, function ( ammo, killer, killerweapon, bodypart ) if ( killer ) and ( killer ~= source ) then if ( getPlayerTeam ( source ) == getPlayerTeam ( killer ) ) then return end if bodypart == 9 then givePlayerExp( killer, math.random ( 300,500 ) ); else givePlayerExp( killer, math.random ( 100,300 ) ); end end end ); I've added the following line; if ( getPlayerTeam ( source ) == getPlayerTeam ( killer ) ) then return end and removed this line; if getPlayerTeam(killer) == getPlayerTeam(killer) then return true end
  15. If you want to do that, you just install the resource and execute the function. You can do this by using triggerServerEvent, triggerEvent or directly with triggerClientEvent. All this needs is the event which is "business.outputMessage", the player, the message and the rgb. That's basically it. Why would you export it if you can also just call the added event, quite double dutch there.
  16. You can always write your own function. All you need is a table for the text that has been sent already ( the messages ), you might even add some time in there if you like. Colors, what so ever. After the table has been filled, loop over the entries and show them. Make them fade, make them fancy. Whatever floats your boat. To do so, you should be able to write it with the following functions/events (might miss some ); triggerServerEvent triggerClientEvent dxDrawText -- for the text, obviously dxDrawImage -- can be used if you want images in there dxDrawRectangle -- if you want a background behind the text getLocalPlayer -- always check if the requested player is the localPlayer to avoid others from getting his messages table.insert -- to save the table onClientRender -- to show your messages setTimer -- to hide them later on, if you want to do this exports -- to call the function from another resource
  17. tosfera

    [Ped]Godmode

    use onClientPedDamage and cancelEvent to avoid them from getting damage. Don't forget to disable the stealth kills too.
  18. I haven't had this problem before yet, but try to set the velocity to 0, 0, 0.1 and right back to 0, 0, 0 again. It should gain it's physics. Another thing you can do is delay the velocity a little bit with a timer of 50ms.
  19. tosfera

    Saving problem

    Try this approach; --[[ -- void:saveData -- Requires the player and it's account as a paramater to save -- the data from the player into the account. ]] function saveData ( thePlayer, theAccount ) if ( thePlayer and theAccount ) then if ( not isGuestAccount ( theAccount ) ) then setAccountData ( theAccount, "level", getElementData ( thePlayer, "player.level" ) ); setAccountData ( theAccount, "experience", getElementData ( thePlayer, "player.experience" ) ); end end end --[[ -- event:onPlayerLogin -- Once the event gets executed, the player will receive it's -- experience and level which is saved into it's account. ]] addEventHandler ( "onPlayerLogin", getRootElement(), function ( _, theAccount ) setElementData ( source, "player.level", getAccountData ( theAccount, "level" ) or 1 ); setElementData ( source, "player.experience", getAccountData ( theAccount, "experience" ) or 0 ); end ); --[[ -- event:onPlayerLogout -- Once the player logs out of their account, we still have -- the account and we should save the data. ]] addEventHandler ( "onPlayerLogout", getRootElement(), function ( theAccount ) saveData ( source, theAccount ); end ); --[[ -- event:onPlayerQuit -- A player can quit the game without being logged in, we -- should first check if the player is logged in. If so, -- save it's data. ]] addEventHandler ( "onPlayerQuit", getRootElement(), function () local theAccount = getPlayerAccount ( source ); if ( theAccount ) then saveData ( source, theAccount ); end end ); I've given a small documentation in the script itself too.
  20. setAccountData is actually the same construct as setElementData, it just gets saved into the account from the player. The player has to be logged in before this'll work. The parameters are as following: account theAccount, string key, mixed value Meaning that theAccount would be the account gotten with getPlayerAccount, the key is something you made up and the value is the actual value you want to give it. A few examples can be; local playerAccount = getPlayerAccount ( thePlayer ) setAccountData ( playerAccount, "username", "John" ) setAccountData ( playerAccount, "password", "Doe" ) setAccountData ( playerAccount, "email", "[email protected]" )
  21. The password hash from IPB forums is a little bit harder than md5, as far as I can remember. You should call the actual hashing function inside IPB to hash your password and make it match that one. Don't copy and paste the function, keep calling it from inside the core of IPB. If they ever update their shitty password hash, you'll be running on the newest version too.
  22. The way you're doing it currently is the way to go for the most realistic way, you just need to work on the timings. 2 timers isn't going to make your entire scene completely. You should add some distance checks, position checks, here and there a few variables holding states and so on.
  23. tosfera

    CEF

    Totally off-topic, last message from being off topic too. By triggereing a client sided event which hasn't been added, it also gets called. Just on the client's console ( debugscript ). Which in his case, probably, is the same location as the server. The chromium dev tools could be the way he found the error, not sure how chromium builds up their errors. If it's the same way as Chrome, it doesn't really fit in there. I've been working with chromium a lot but I can't remember the way they build them up. Not even sure if they aren't just transforming the direct javascript error towards the console.
  24. either avoid users from doing the same job, or rewrite the script so it has a client and server sided file that controls the marker creation and the events for markers.
  25. tosfera

    CEF

    If you're not adding the event, the server's console should've thrown an error. Guess ThePiotrek did watch his console before coming here. From the style that the error has been noted, it should be in his browser outside of MTA. Even though it does miss some things for a real console error from Javascript. It's not styled as an error from MTA either, so it could be IE/edge's console. Not sure how they build up their errors.
×
×
  • Create New...