-
Posts
667 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Mr.Loki
-
If you used this I'm sure there would be an error. You should use your debugscript to locate errors in your code
-
If you create a vehicle on the client, only that client can see it other players won't.
- 8 replies
-
- warppedintovehicle
- player
-
(and 1 more)
Tagged with:
-
Could somebody help me with a weapon selector and dx functions?
Mr.Loki replied to Dzsozi (h03)'s topic in Scripting
To skip the empty slots just make a check for the ammo in that weapon slot int getPedTotalAmmo ( ped thePed, [ int weaponSlot = current ] ) -
Would I need to set it up on the server that I'm trying to get a connection from? Because I just want to check if the server is online.
-
Is there anyway to ping another serer from a server? I've been trying to find a way for a while now but no luck with using the call/FetchRemote functions and APIs. I'm creating a redirect script and want to get the redirected server's online/offline status before connecting the player.
-
Dayz has its own respawning system if you want the dayz vehicles to respawn faster there are 2 things you can do Delete the backkup database in tools/database.db or make a command to call the function "spawnDayZVehicles" addCommandHander("spawnvehicles",function() spawnDayZVehicles() end) also if you want the vehicles to respawn faster look for the onVehicleExplode event there should be a timer in that function with 1800000 miliseconds = 30 minutes change it to whatever time you want but keep it over 1 minute to be safe.
-
https://wiki.multitheftauto.com/wiki/EngineReplaceModel the sxample shows how to replace objects when the resource is started. The only way to add a model is to replace a model ingame with the model you want http://dev.prineside.com/en/gtasa_samp_model_id/ A nice list of every object in the GTA:SA world.
-
function position() local x,y,z = getElementPosition(localPlayer) outputChatBox(x..", "..y..", "..z+.5, 0, 255, 0) setClipboard(x..", "..y..", "..z+.5) outputChatBox("Position has been copied to your clipboard.", 0, 255, 0) end addCommandHandler("getpos",position) To get more spawn positions just go where u want a vehicle to spawn and use the command and paste it into when vehicle table. Don't forget to add the vehicle ID before the first comma so it should look like: {vehicleID, x, y, z}
-
you also have to add the song to the meta.xml <file src="song.mp3"/>
-
you didnt have to create a new topic and onPlayerJoin is client side dxDrawText is client side those functions do not go together What you can do is create an event so that when the player joins it will render the dx elements for them.
-
Its because you have not converted the positions to be relative for other resolutions. If you are using guieditor right click on the dx element and check "relative" then it would fit other resolutions. if you are not then get it here guieditor. It maked creating any GUI easy.
-
anyway to fix it so the Helicopter blades do not kill when they hit you?
Mr.Loki replied to Andres99907's topic in Scripting
onClientPlayerHeliKilled Use the example on the page -
if not fileExists( "texts/log.txt" ) then fileCreate( "texts/log.txt" ) end addEventHandler("onPlayerChat",root, function (message) if message ~= "" or message ~= " " then local logs = fileOpen("texts/log.txt",false) local name = getPlayerName(source) local text = fileRead(logs, 1000000) local t = getRealTime() local d,m,y,h,m,s = t.monthday,t.month,t.year,t.hour,t.minute,t.second local timestamp = "["..d.."/"..m.."/"..string.sub(y,2).."-"..h..":"..m..":"..s.."]" local text = timestamp.." "..name..": "..message.."\n" fileWrite(logs,text) fileFlush(logs) fileClose(logs) end end )
-
Code is incomplete to be able to tell the error and also alpha does not go higher than 255 so 1000 wont give you the right alpha it would give you an alpha of 235.
-
Can you be a bit more specific? Give an example.