-
Posts
6,062 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
50P setWeaponProperty(30, "pro", "damage", 1) setWeaponProperty(30, "std", "damage", 1) setWeaponProperty(30, "poor", "damage", 1) -- "poor","std" and "pro" The reason why it did not work in the first place is that all weapons in freeroam(probably) start with differed skill levels. When you change the weapon damage, it will also change the damage vs peds and players. It is possible to reduce it without change the default value, but that will require much and much more scripting skills. I made it, but of course I won't give it to you, because it cost me lots of time.
-
sx,sy = guiGetScreenSize() font = dxCreateFont("tsw.ttf", 20) local screenWidth,screenHeight = guiGetScreenSize() local messagesList = { "LOL MESSAGE", "Server Owner: Sex*", "Have Fun!"--, 1 to much. >>>>>>>>>>>>>>>>>>>>>>>> } local currentMessage = 0 function toggleHideAll() startTimess = getTickCount() addEventHandler("onClientRender",getRootElement(),mapwindowa) end addEventHandler ( "onClientPlayerWasted", localPlayer, function ( ) toggleHideAll ( ) end ) function mapwindowa() local pX, pY, pZ = getElementPosition ( source ) local hours = getRealTime() .hour local minutes = getRealTime() .minute local seconds = getRealTime() .second local sec = getTickCount() / 1 local rotate = math.ceil(sec) * 0.20 deltaTime = (getTickCount()) - startTimess if deltaTime <= 1000 then beta = sy - ((deltaTime/1000)*100) elseif (deltaTime > 1000) and (deltaTime < 4000) then beta = sy-100 end dxDrawRectangle((sx-1400)/2,beta,1400,110,tocolor ( 0, 0, 0, 225 )) dxDrawImage ( screenWidth/1-200, screenHeight/1-100, 140, 100, 'load.png', rotate, 0, 0 ) dxDrawText("Time:"..hours..":"..minutes..":"..seconds,125+(sx-400)/2,beta+50,((sx-400)/2)+400,beta+99,tocolor(255,255,255),2,"default-bold","left","top",true,true,true) dxDrawText(messagesList[currentMessage + 1], screenWidth - 400, 6, screenWidth - 400, 16, tocolor(0, 255, 0, 255), 1, "font", "center", "top", false, false, false) end ) function updateMessage() if (currentMessage == 4) then currentMessage = 0 else currentMessage = currentMessage + 1 end end setTimer(updateMessage, 5000, 0) addEvent (":O", true) addEventHandler (":O", root, function () removeEventHandler ("onClientRender", root, mapwindowa) removeEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), mapwindowa) end ) I found one bug in your table: "Have Fun!", = to "Have Fun!" This small comma is so sneaky, I also forget to add and remove them. If it still does not work, do what mat+ said and tell us the other errors.
-
aha, Well it works very good, I haven't seen hackers since circa 2009.(I am not sure if that is the right year, maybe 2008 too)
-
Will the new detections require more data transfer? Or is it full client side?
-
This should work... How many times does this function get executed? function showBox(text, r, g, b, t) if not r or not g or not b then r, g, b = 255, 255, 255 end if not t then return end local color = tocolor(r, g, b, 255) or -1 if t > 100 then playSoundFrontEnd ( 13 ) boxes[id] = {text, color} timers[id] = setTimer(destroyBox,t,1,id) id = id + 1 outputChatBox("executed!" ) end end
-
and it still does not stop? -- and this? local remove = boxes[ids] remove[1] = nil remove[2] = nil boxes[ids] = nil
-
Did you try to debug your code? /debugscript 3 and add some outputDebugString("....") it is much easier to find the bug. The code looks fine, try: function destroyBox(ids) boxes[ids] = nil outputDebugString(ids .. " is nil") end
-
Well maybe then I should first check your export..... ("test", root,255,0,1000) local R,G,B = 255,0,0 --[[ is it: ]] ("test", root,R,G,B)--? (B can't be higher then 255) --or local time = 2000 local Repeated = 1 local R = 255 --[[ is it: ]] ("test", root,R,Repeated--[[(0= infinity, 1=1x, 2=2x, etc)]],time)--? You can't expect that I know how this hud export fits.
-
Client: https://wiki.multitheftauto.com/wiki/OnC ... ourceStart server: https://wiki.multitheftauto.com/wiki/OnPlayerJoin
-
I normaly don't help my competitors who hosting the same gamemode as me, but here you can download my map: https://community.multitheftauto.com/ind ... ls&id=5643
-
lol the 'vehicle' -_-" I am stupid....
-
To know if the script has been executed the only thing you have to do is: outputChatBox("Works" ) Outside the function. So easy as hell....
-
@Anderl, do you think this event will work? I never used the Event "onPlayerReachCheckpoint".
-
yes, client. But I hate f*ck client. I script server. ahh removed your post....
-
Since when is onPlayerReachCheckpoint client side O_o setElementRotation(localPlayer, x1, x2, x3(localPlayer)) heh????? function warphigh(checkpoint, time) local x, y, z = getElementPosition (source) setElementPosition (source, x, y, z+20) setPlayerRotation (source, getPlayerRotation (source)) end addEvent('onPlayerReachCheckpoint') addEventHandler('onPlayerReachCheckpoint', getRootElement(), warphigh)-- NO >() maybe getRootElement() must be root, but I am not sure... function warphigh(checkpoint, time) local x, y, z = getElementPosition (source) setElementPosition (source, x, y, z+20) setPlayerRotation (source, getPlayerRotation (source)) end addEvent('onPlayerReachCheckpoint') addEventHandler('onPlayerReachCheckpoint', root, warphigh)-- NO >()
-
Not really, but there is something called: https://wiki.multitheftauto.com/wiki/ProcessLineOfSight
-
addEvent('onPlayerReachCheckpoint') addEventHandler('onPlayerReachCheckpoint', getRootElement(), function (checkpoint,time)-- if needed checkpoint,time local x, y, z = getElementPosition (source) setElementPosition (source, x, y, z+20) setPlayerRotation (source, getPlayerRotation (source)) end) --"warphigh(source)" why? I have never worked with it but here in Russian: https://wiki.multitheftauto.com/wiki/RU/Resource:Race
-
(weaponObjectsVeh)[1] = weaponObjectsVeh theVehicle = v[1] attached to the vehicle. weapon1=v[2] weapon2=v[3] I can't check a "table" if it is an element. When the vehicle get removed(gone) this filter will remove the weapons from the vehicles. The server table and the client together are working with the same data. Why I work with tables instead of element data is that I can decide when I send data to those players. If a player is in the spawn menu, he should start downloading new data at moments he really joins other players. Also when they are doing a minigame, it isn't necessary to download those data. Thank you again.
-
aha got it, thank you server for i,vehicle in ipairs (weaponObjectsVeh) do while weaponObjectsVeh[ i ] and not isElement(weaponObjectsVeh[ i ]) do table.remove(weaponObjectsVeh,i) end end client for i, v in ipairs (weaponObjectsVeh) do --if not isElement(v[1]) then while weaponObjectsVeh[ i ] and not isElement( (weaponObjectsVeh[i])[1] ) do local vehicle2,weapon1,weapon2 = unpack(weaponObjectsVeh[i]) destroyElement (weapon1) if isElement(weapon2) then destroyElement (weapon2) end table.remove(weaponObjectsVeh,i) end end can it be smaller? because I call this index like 4x.
-
I forgot this: my element I need to check is here: v[1] v[2] = weapon1 v[3] = weapon2 element, weapon1, weapon2 = unpack(v) is this possible? (myTable[ i ])[1]
-
for i, v in ipairs ( myTable ) do while myTable[ i ] and not isElement( v[i ] ) do table.remove( myTable, i ) end end btw my element I need to check is here: v[1] v[2] = weapon1 v[3] = weapon2 element, weapon1, weapon2 = unpack(v) like this? Note: while is dangerous stuff, even my intel boxed can crash of it....
-
Well I think I let the inpairs loop twice,