
arezu
Members-
Posts
446 -
Joined
-
Last visited
Everything posted by arezu
-
you overwrote the mta function 'createVehicle', and then you call it inside it again on line 7. Rename the function to something else. function createVehicleBlabla(vehID, warp) local name = getPlayerName(source) outputChatBox("I am " .. name .. ".") local x, y, z = getElementPosition(source) local rx, ry, rz = getElementRotation(source) local veh = createVehicle(vehID, x, y, z + 1, rx, ry, rz) if warp == true then warpPedIntoVehicle(source, veh, 0) else setElementPosition(source, x, y, z + 3) end end addEvent("giveVehicle", true) addEventHandler("giveVehicle", root, createVehicleBlabla)
-
Press f3 to browse a new object to select, and then press cancel. (Optionally create a new object) Works for me all the time.
-
local sWidth, sHeight = guiGetScreenSize() local scale = 1.0 local font = "bankgothic" local textWidth = dxGetTextWidth(text, scale, font) local fontHeight = dxGetFontHeight(scale, font) dxDrawText(text, sWidth/2 - textWidth/2, sHeight/2 - fontHeight/2, sWidth, sHeight, tocolor(255, 255, 255, 255), scale, font)
-
Do you want the text size to be the stay the same size? or what?
-
setPedStat(thePlayer, 230, 999) if that doesn't work, then try the other id's instead of 230 which you can find on wiki.
-
this? setWorldSpecialPropertyEnabled("extrabunny", true)
-
you forgot the parameters in 'onDoubleClick'
-
Its so messy.. but first; why are you using so many elseif with the same conditions? And you should see the problem if you type /debugscript 3 in game while being inlogged as admin and then restart script
-
Ok, here is some shitty old code: -- client sided addEventHandler("onClientExplosion", getRootElement(), function(x, y, z, theType) triggerServerEvent("onRequestShowKiller", source, x, y, z, theType) end) -- server sided addEvent("onRequestShowKiller", true) addEventHandler("onRequestShowKiller", getRootElement(), function(x, y, z, theType) if(x == nil)then return end local player = getElementsByType("player") for i = 1, #player do local vehX, vehY, vehZ = getElementPosition(player[i]) if(getDistanceBetweenPoints3D(x, y, z, vehX, vehY, vehZ) <= 20)then kira[source][#kira[source]+1] = player[i] end end end) and then onVehicleExplode i write who killed who. You will need to edit the code because it is shi**y
-
There is no certain way to get the killer, but you can use onClientExplosion and check distance from the explosion to the other vehicle that got exploded in a time frame of 50-250milisecs. I did that for my achievements script and it is working pretty good actually.
-
You can do it with php, but all servers doesn't use php. And it would be alot easier and faster if there were a function like this.
-
addEventHandler("onPlayerJoin", getRootElement(), function() -- blablalba end) is the same as: [ lua] addEventHandler("onPlayerJoin", getRootElement(), function() -- blablalba end) [ /lua] dont forget to remove the space after the '['
-
Read his post in a sarcastic tone.
-
There were lots of syntax errors, and it would not work either way. (Lua tag doesn't work correctly) function handleCommands() local commandCount = getElementData(source, "command.count") or 0 if(commandCount == 5) then cancelEvent() outputChatBox("Please refrain From Command Spamming !", source, 255, 0, 0) else setElementData(source, "command.count", commandCount + 1) end end addEventHandler("onPlayerCommand", root, handleCommands) setTimer( function() for k, player in pairs(getElementsByType("player")) do setElementData(player, "command.count", 0) end end, 5000, 0) function sa (cmd) if cmd == 'gun' then outputChatBox(getPlayerName(source) .. Has Write [Gun] !,255,255,0) else if cmd == 'rsp' then outputChatBox(getPlayerName(source) .. Has Write [rsp] ! ,255,255,0) end end addEventHandler("onPlayerCommand", root, sa)
-
You can add 'download' tag to the file nodes like this: then it wont download the file automatically, and you can then use downloadFile instead to download the file manually. however, this function is not out in the current official version of MTA yet.
-
I read your other post and it looked interesting so i began making my own for fun just before school starts. You can download this and continue on it (or someone else can continue on it if they want). http://www.mediafire.com/?ecfvryc6q6oarkv
-
what information of the object do you want to give to the server? or what do you want to do with it. And yeah, i've tried to triggerServerEvent and send a client created vehicle as argument but then it didn't trigger, so i changed the code and created it server sided instead.
-
It's very easy to find many maps because people steal them all the time (like, almost all servers has vortex maps). So I dont think anyone wants to trade stolen maps for something they made by themself and which takes time to make.
-
you forgot 'end', and time to wait before calling it, and how many times. and why use two setTimers? setTimer(function(player) setPlayerMuted(player, false) outputChatBox("[CENSORING SYSTEM] : The player "..getPlayerName(player).." has been unmuted.", getRootElement(), 250, 0, 0, true) end, 10000, 1, source)
-
Yes good try function joinTime () setElementData ( source, "joinTime", getTickCount() ) end addEventHandler ( "onPlayerJoin", root, joinTime ) function checkonline (player) local timeon = getTickCount() - getElementData ( player, "joinTime") /60000 outputChatBox("Time spent in server: "..timeon.. " minutes.",player,255,255,255) end addCommandHandler ( "timeinserver",checkonline) Now you can use a for loop to check who is online for most time. basic math rule: local timeon = (getTickCount() - getElementData ( player, "joinTime")) /60000 otherwise it would divide the element data with 60000 first
-
use setElementDimension instead because: You wont be able to see their nitro(they will be completely hidden) you wont get hurt if they blow up near you(they dont exist it the same space as you) it works as if the player is not there, meaning that you will have the same fps when 50 vehicles are near you as if only 2 vehicles would be near you
-
cry after first reinstalling mta
-
oh, ok.. then i have no idea
-
I dont think you can create a vehicle and then warp ped into the vehicle when using race gamemode, because race has a timer that check player vehicles and removes and puts the players into them when needed. So even if you got it to work, it wont work in the end.