-
Posts
1,090 -
Joined
-
Last visited
Everything posted by Xwad
-
zeah now its working 100% thanks:D
-
i dont want to make it like this. I want to stop the rhinos turret where it is looking at the time when i stop it
-
fixing argumentum problems was always difficult for me..pls help! Bad 'sound/player' pointer @ setSoundVolume'(1) Bad Argumentum @ 'playSound' [Expected string at argument 1,got table] sound = {"files/shoot.wav", "files/shoot2.wav"} sounds = sound [ math.random ( #sound ) ] function random_sound() local shoot = playSound(sound) setSoundVolume(shoot, 1) end addCommandHandler ( "go", random_sound )
-
yeah i tryed that but its not working:/ function stop_turret_rotation() local veh = getPedOccupiedVehicle(localPlayer) local id = getElementModel ( veh ) if id == 432 or id == 601 then local x, y = getVehicleTurretPosition (veh) setVehicleTurretPosition ( veh, x, y ) end end function event() addEventHandler("onClientRender", root, stop_turret_rotation) end addCommandHandler("event", event)
-
but on the rhino there are nothing adjustable:/
-
hi im trying to make a script that will play a random sound when i type "test". the script is not working pls help. sound = {"files/shoot.wav"}, {"files/shoot2.wav"} sounds = sound [ math.random ( #sound ) ] function random_sound() local shoot = playSound(sound) setSoundVolume(shoot, 10) end addCommandHandler ( "test", random_sound )
-
Hi. Is there any function to stop the rhinos turret roration? Thanks.
-
ohh i just see your post now citizen. I made it very similar, i just added getElementModel becaouse i want that the image will only appear if the player enters the rhino:D
-
Dealman you are right! now its working! i added replaced the for, loop with getPedOccupiedVehicle and getElementModel. Thanks Citizen and Dealman now my script is totaly working:D
-
I already found the pivot point. And no, i already said: the problem is not with the image. I replaced all images with another images and its still duplicated. So im 100% sure that the problem is not with the image
-
i Tryed everythink but its still there.. I also tryed to use another image but its still duplicated:( help!!!
-
Your code is working! Now the image is rotating to the right direction. Thanks! Yeah i already did that, and its working. No there's no problem in the image file. It seems that the problem is maybe in the code.. So the turret.png is still duplicated:// Any ideas?
-
Hi i made a script whitch creates a dxDrawImage. this dxDrawImage will rotate to that position where the tanks turret is looking at. my problem is that the image is always rotating to the opposite side.. The other problem is that its creating 2 images.. One image is rotating and the other image is just staying and i want to remove that. here are some pictures. I hope you understand me and you can help me.. Thanks. client.lua function renderDisplay ( ) dxDrawImage ( screenWidth/2 + 480, screenWidth/2 - 130, 100, 160, 'body.png', 0, 0 ) local vehicles = getElementsByType ( "vehicle" ) for vehicleKey, veh in ipairs(vehicles) do local x, y = getVehicleTurretPosition ( veh ) x = math.deg ( x ) y = math.deg ( y ) dxDrawImage ( screenWidth/2 + 504, screenWidth/2 - 155, 50, 130, 'turret.png', x, 0 ) end end function show() local vehicle = getPedOccupiedVehicle(localPlayer) local id = getElementModel ( vehicle ) if id == 432 then addEventHandler("onClientRender", root, renderDisplay) end end addEventHandler("onClientVehicleEnter", root, show) function hide() local vehicle = getPedOccupiedVehicle(localPlayer) local id = getElementModel ( vehicle ) if id == 432 then removeEventHandler("onClientRender", root, renderDisplay) end end addEventHandler("onClientVehicleExit", root, hide) OPOEN THE PICTURES TO SEE FULL RESOLUTION http://imgur.com/G3jkTnD http://imgur.com/0nSjdkE
-
now its working thanks!
-
Its not working:/
-
hi im trying to replace the cursors image with a script but its not working. i hope you can help me thanks. client.lua function show() local showing = isCursorShowing () if showing then local screenx, screeny = getCursorPosition() dxDrawImage ( 5, 5, 50, 50, 'files/crosshair.png', screenx, screeny ) setCursorAlpha(0) end end addEventHandler('onClientRender', root, show )
-
Einheit diese objekte hat nich er gemacht.. Du kanst es auf deinen server benutzen wan du es willst.
-
Hi Community! Let me introduce my new Normandy 1944 (Dday) 2.0 map! It's based on the World War 2 Normandy invasion on 1944. I had a lot of work with the map. Unfortunately i stopped scripting in mta so i will not develop this map anymore. The map was build to the san fierro coast. I hope you like it! All models, EXPECT the coast and the bunker model (It is created by me with 3ds max and Skech up), are downloaded UPDATE 2025-07-26 Hello everyone, it’s been a while! I have uploaded it again to Google Drive. I wanted to share not just the map but everything else i have worked on in the past. I even managed to recover some files I thought were lost forever! The downloadable ZIP file includes a variety of World War 2 resources: scripts, 3D models, sound effects, and a complete game mode as well (with some minor bugs). Please note that the files are a bit unorganized, and you may find duplicate versions, both older and newer of the same assets. Here’s a quick preview of what’s included: Scripts: More custom weapons & tanks, flak guns, static MG’s, mortars, plane bombing, character classes etc. Maps: Berlin 1945, DDAY and an unfinished Stalingrad Hope this will be useful. Good luck! DOWNLOAD: https://drive.google.com/file/d/1CnmPYg0YvPxHx3ZEpmDMFADPzP4qpVYE/view?usp=drivesdk version: 2.0 Here are some pictures of the map: (Open the link for full sise pictures) Video: http://postimg.org/image/v8huo3njv/ http://postimg.org/image/llecedukb/ http://postimg.org/image/b2iy2yha3/ http://postimg.org/image/pjfe90liz/
-
Is it possible to check if i hit an object that...?
Xwad replied to Xeonmeister's topic in Scripting
I think you should attach a col to the object -
So what should i do now? Is that an mta bug that isnt possible to fix?
-
server.lua function attach(veh) --local mid = getElementModel ( veh ) --if weapOff[mid] then setPedAnimation ( source, "SILENCED", "SilenceCrouchfire", 1, false, false, false, true ) attachElements ( source, weapon_base, 0.05, -0.62, 1.1, 0, 0, 90 ) setElementCollisionsEnabled ( source, false ) toggleControl (source,"fire", false) setElementData ( source, "attachedToWeapon_v", veh ) setElementData ( source, "currentCol", nil ) setElementData ( source, "attachedToWeapon_w", weap ) setElementData ( veh, "playerOnWeapon", source ) end --end addEvent("attachPlayerToMinigun", true) addEventHandler("attachPlayerToMinigun",getRootElement(), attach)
-
this is also not working:(
-
its not working:/ now its the same like this: setPedAnimation ( source, "SILENCED", "SilenceCrouchfire", 1 ) the animation is always restarting. and i want to make that its not moving
