-
Posts
283 -
Joined
-
Last visited
Everything posted by Buffalo
-
change to 0 or completely remove this line
-
Ye i've already tried setting an external web server, it helped; thanks anyway
-
local weapFunc = { [26]={nil,0.4},[30]={'ak1',0.2},[31]={'M4',0.15},[29]={'MP5',0.1},[34]={'SNIPER',0.5},[24]={'deagle',0.05},[25]={'Shotgun',0.3},[27]={'Shotgun',0.3} } local localPlayer = getLocalPlayer ( ) function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) local x,y,z = getPedWeaponMuzzlePosition ( source ) local x,y,z = getPedWeaponMuzzlePosition ( localPlayer ) if(getDistanceBetweenPoints3D(x,y,z,px,py,pz) < 80) then if weapFunc[weapon] then if weapFunc[weapon][1] then playSound3D ( "sounds/"..weapFunc[weapon][1]..".ogg") end if(source == localPlayer) then createExplosion ( x,y,z + 10,12,false,weapFunc[weapon][2],false) end end end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), onClientPlayerWeaponFireFunc ) The idea is that custom sound should play when somebody else is shooting, it plays, yes, but not clear, with.. crackles. However it plays well for local player (when he shoots).
-
IDK which FTP browser you are using, but I CHmod files by clicking on it right mouse button and selecting properties, then place ticks or type 7777 value, so all privileges are granted. In some browsers you can easily click on it RMB and select CHmod. That way all server files should be CHmoded.
-
Check if 'Png/SENTINEL.png' does really exist in resource vehiclesshop, and if it does, then it can't be something other than the fact they are not CHmoded.
-
Yup, MTA installation is easy as it is. You need just to press next (except if you don't want some features installed). Ah and if you don't have that visual c++ thingy, it will be installed too as necessary (and it's quite fast).
-
That's the same issue i have, using 1.0.3 debian 5. Have to wait 1.0.4 then. Thanks for reply.
-
Sometimes server refuses to download resource files, it fixes after some time (20min) or stopping/starting server. During this more players are unable to connect. Does this happen on windows server too?
-
I mean you need to download map to clients separately; objects created in script don't need to be downloaded. Furthermore, downloading like 500kb-2mb every time you enter the server is very tiring.
-
I mean you can't actually set ped's team, so you need to find other way. What i offer to you is setting players, that are in team A, element data to 1, then setting peds, that you want them to be in same team, data to 1 too. Then onClientPedDamage check if data is same and if it is, cancelEvent. That only example of how to stop damage if ped is in your team. If you want that peds would be showed in scoreboard like they are in your team, you must script scoreboard resource to do so. Or just tell why you want peds to be in teams, i can't think of any other reason you want to do so.
-
The reason I don't use map files is that they need to be downlaoded seperately.
-
You shouldn't use the peds in teams. Do some workaround, as if you only need to stop damage for peds in certain teams e.g. set their and other team members element data and cancel damage event client side if data matches.
-
Editor is perfect. I've just missed one simple thingy, when one word is highlighted, other same words should be highlighted as well, to see wheres it's used in all script, pretty useful to me. Best regards.
-
^ Helped Alot, thanks
-
Error is happening all the time, after i had installed 1.0.2 linux server files package to my server. When server sends me .map, resources can't be even started to send because of this error i get every time: Download error. Couldn't connect to server. At first, I thought it could be my problems with ports. Then I had downgraded it to 1.0.1 and it worked fine. It happens not only for me. Any solutions?
-
It's got fixed after linux upgrade came out. Just for reference.
-
local speedx,speedy = getElementVelocity(vehicle) local px,py = getElementPosition(vehicle) local nx,ny = speedx * 50 + px, speedy * 50 + py local staticRot = ( 360 - math.deg ( math.atan2 ( ( nx - px ), ( ny - py ) ) ) ) % 360 local _,_,currRot = getVehicleRotation(vehicle) local driftAngle = math.abs(staticRot - currRot)
-
In case you aren't very good at complex maths, use createExplosion() client side in local players stream, so the camera would shake heavily enough for this effect. Just script explosions without sound/graphic view and damage.
-
Configure mtaserver.conf so server will apply only those modes you declared. To make a new mode from scratch, you need to know the basics of lua coding and resources system in MTA so read wiki. Theres no public roleplay mode released atm, so you'll need to script it yourself.
-
Same here. Server crashes after 2-20 hours, it won't stay longer in any case, even running no gamemode at all. And ye, sometimes it won't send you resources. Does restarter work correctly? If it does, please write a link so i could download it. Server Version 1.0.1 from linux.multitheftauto.com, /libs/ are 1.0; Running on debian linux. Theres the error: terminate called after throwing instance of 'std:bad_alloc' what(): std:bad_alloc
-
Use math functions.. math.ceil() or math.floor()
-
You could use google sometimes http://download.microsoft.com/download/ ... bsetup.exe
-
To avoid confusion between images, i think u would wanna to hide standart ones: function showClientImage() -- Image 0 should be the fists (i guess) image = guiCreateStaticImage( 795, 35, 75, 100, "Hud_ammo/0.png", false ) -- This creates the image. Standard 0 cuz that is the fist [b]showPlayerHudComponent ( 'weapon', false )[/b] end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage )
-
ServerSide: function arrest ( thePlayer ) setElementPosition ( thePlayer, 198.8221, 162.0566, 1003.0299 ) setElementInterior ( thePlayer, 3 ) toggleAllControls ( thePlayer, false ) --disable the criminals controls ( basicly freezing him ) takeAllWeapons ( thePlayer ) --remove all of the players weapons setTimer ( toggleAllControls, 15000, 1, thePlayer, true ) setTimer ( setElementPosition, 15000, 1, thePlayer, 2335.9614, 2454.5168, 14.9687 ) setTimer ( setElementInterior, 15000, 1, thePlayer, 0 ) outputChatBox ( "You will be released in 15 seconds", thePlayer, 0, 100, 255 ) triggerClientEvent(thePlayer,"onPlayerArrest",thePlayer) end addCommandHandler ( "arrestme", arrest ) ClientSide: local msgPng = nil function releasemessage ( ) msgPng = guiCreateStaticImage( 20, 200, 100, 100, "image.png", false ) setTimer(hideRMsg,7000,1) end addEvent ( "onPlayerArrest" ,true) addEventHandler ( "onPlayerArrest", getRootElement(), releasemessage ) function hideRMsg() if(msgPng) then destroyElement(msgPng) end end
-
Same was here; Try to check if compatibility mode for gta_sa.exe is not set to 'win NT';
