benwilkins
Members-
Posts
80 -
Joined
-
Last visited
Everything posted by benwilkins
-
Still displays after I let go of "P". When I press in P, the text should display, and when I let go of P, the text should be removed.
-
Thanks for the quick reply! But it just stays there now, when I release the button, it doesn't disapper.
-
function showplat ( command ) if getKeyState("p") then if isPedInVehicle(localPlayer) then local localPlayerOccupiedVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) local plateText = getVehiclePlateText ( localPlayerOccupiedVehicle ) local x, y, z = getElementPosition(localPlayerOccupiedVehicle) local tx, ty = getScreenFromWorldPosition(x, y, z, 5000, false) dxDrawText(plateText, tx, ty, tx, ty+10, tocolor(255, 255, 255, 200), 1, "bankgothic", "center", "center") end end end bindKey ( "p", "down", showplat ) I am testing something out, and I am trying to make it so when I hole P then the text will appear above the car, but when I press P, it appears and then disappears straight away. Thanks!
-
I have put a tazer in replace of the silencer. Last time I checked it was impossible to remove the silencer sound when fired, Is it still possible? I saw the function setWorldSoundEnabled, Is it possible to put it in an if statement like, "If the gun is a silencer" then "setWorldSoundEnabled to disabled"
-
Thank you! I was just wondering, after testing its a little buggy. Is it possible to set the xyz of the postion of the shooter, and not where the bullet hit?
-
Client: function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, x, y, z, hitElement) if (weapon == 23) then triggerServerEvent ( "playit", getLocalPlayer(), x, y, z ) end end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) function soundplay (x, y, z) local sound = playSound3D("Taser.wav", x, y, z, false) setSoundVolume(sound, 1) setSoundMaxDistance(sound, 10) setSoundVolume(sound, 3) setSoundMaxDistance(sound, 100) setElementInterior ( sound, 0 ) setElementDimension ( sound, 0 ) end addEvent( "playSound", true ) addEventHandler( "playSound", getRootElement(), soundplay ) Server: function playAlarm (x, y, z) triggerClientEvent ( "playSound", getRootElement(), x, y, z ) end addEvent( "playit", true ) addEventHandler( "playit", getRootElement(), playAlarm ) Basically, I am trying to to play Tazer.wav whenever someone shoots a silenced pistol, but I want the sound to be played to everyone who is within a certian radius of the xyz of the person who shot. It currently works, but it seems to play the sound for as many people who can hear it. EG: If I stand by 3 other people and shoot the weapon, the sound will be played 4 times, when it should only play once. Thanks!
-
Clientside fixed it. Thank you snake.
-
Still doesnt work
-
On linux this would remove the world object, but I have just put the server onto Windows, and it doesnt do anything. I restart the resource, reconnect, and it is still there. deleteworld.lua: function start() --Warehouse removeWorldModel(5397, 200, 1928, -1762, 25) removeWorldModel(5536, 200, 1928, -1762, 25) --LOD end addEventHandler("onResourceStart", getResourceRootElement(), start) meta: client="1.3.0" server="1.3.0" />
-
Still doesnt do anything. Still the default roadtrain.
-
I try to loadmodule mta_mysql.so and get: MODULE: Unable to find modules/mta_mysql.so (libmysqlclient.so.15: cannot open shared object file: No such file or directory)! The file is deffinatly there, how do I fix this? Thats what I get. I am running 64bit CentOS.
-
Hey, I have a few car mods, and I was trying to produce a way of making the client download the files and apply them after they spawn, so they can get in the game, but not needing to download the mods till they get in, so they can actually play while it downloads. I figured out how to set them after they spawn, but is there a way to get around the meta.xml downloading them on player connect?
-
I have put a mod on the server for trams, but its sunk into the ground a little, so I am trying to add the handling it came with TRAM 1900.0 4795.9 1.0 0.0 -0.3 0.0 85 0.97 0.77 0.51 5 150.0 25.0 5.0 R P 8.5 0.45 0 30.0 1.3 0.08 0.0 0.3 0.2 0.0 0.5 0.2 0.50 26000 1 400000 0 1 13 How can I add this to ALL trams that get spawned?
-
I have two mods that are 16MB each. Is there a way to compress them so they arnt so big to download?
-
Hey, is there a web plugin that I could get server stats and display them on my website. I don't want to use game-monitor boxes, as I just want the playercount / maxplayers.
-
Thank you, it worked.
-
I have put the following code into my script: local x, y = guiGetScreenSize() dxDrawRectangle ( x/800.8, y/860, 1000*10, 1000, tocolor ( 0, 0, 0, 220) ) But if you look at the image below, there is a small line at the left and the top where the rectangle does not cover. I have tried messing with the x/ and y/ values, but it doesnt do anything. http://puu.sh/qIEw Any ideas?
-
GUIEditor_Label[1] = guiCreateLabel(715, 568, 78, 17, "Version 2.0.4" ,false) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"bottom") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"right",false) Ive done that, but its find in one aspect ration, but in a differant resolution its in the middle of the screen, help?
-
Above the MTA:SA 1.3* I have seen some severs have custom text above it, how would I go about that?
-
function doammo() setWeaponProperty(23, "pro", "maximum_clip_ammo", 2) setWeaponProperty(23, "std", "maximum_clip_ammo", 2) setWeaponProperty(23, "poor", "maximum_clip_ammo", 2) end addEventHandler("onClientResourceStart", getResourceRootElement(), doammo) What am I doing wrong?
-
I am trying to make a taser mod, Is it possible to set the silenced pistol to only have 2 bullets, then have to reload?
-
I have two files. mp_policesf.txd mp_sfpd_big.dff They replace the SFPD building, but how do I load these? I have been in map editor, and with World Model it says that mp_sfpd_big is ID 14847
-
BASS ERROR 0 in PlayStream b3D = true path = http://acemta.listen2myradio.com/media/ ... 240493.asx Never seen ERROR 0 .. What does it mean? Only a few people get the error, others can hear the sound fine.
-
I am trying to attach a sound to someone, so when they /play there is a sound that will play to all players from around the player. Its working, but it freezes the postion, and wont attach to the player when he moves: client: function play (x,y,z) play = playSound3D('http://stream.electroradio.ch:26630/listen.pls', x,y,z) setSoundVolume(play, 10) setSoundMaxDistance(play, 100) end addEvent("play", true) addEventHandler("play", getRootElement(), play) server: function play2 (thePlayer) local x,y,z = getElementPosition(thePlayer) triggerClientEvent ( "play", getRootElement(), x,y,z ) end addCommandHandler("play", play2)
-
Im trying to remove a building with the new command, removeworldobject. It will delete some detail, but the building still remains, but its non-solid and can still walkthrough it, its the same on every building i try. Code: removeWorldModel(8038,10000,1291.5999,1610.800,29.8999) Xml: client="1.3.0" server="1.3.0" />
