Jump to content

bandi94

Members
  • Posts

    1,037
  • Joined

  • Last visited

Everything posted by bandi94

  1. I told you that , the function has a check for admin's "there is a check if the player is admin or not , if you remove that".... I told you very clear if you REMOVE that check then every player can use it from your buymap GUI
  2. buy next map can be done with the command you found in admin panel. Open admin panel search the function in the map tab "set next map" , there will be a call. Search that call in race gamemode , and edit it. (there is a check if the player is admin or not , if you remove that) then you can use the same call as admin panel , in your script .
  3. function stworzPaliwo ( ) local v = getPedOccupiedVehicle( getLocalPlayer() ) if ( v ) then local fuel = getElementData( v, "fuel" ) if not fuel then setElementData ( v, "fuel", 50 ) fuel = 50 -- or getElementData ( v, "fuel") it's the same thing outputChatBox ( "Stan paliwa: "..fuel, 255, 255, 255, false ) end end end addEventHandler ( "onClientVehicleEnter", getRootElement(), stworzPaliwo )
  4. Well complied , not mean that is impossible to get back the source code .
  5. function stworzPaliwo ( ) local v = getPedOccupiedVehicle( getLocalPlayer() ) if ( v ) then local fuel = getElementData( v, "fuel" ) if not fuel then setElementData ( v, "fuel", 50 ) outputChatBox ( "Stan paliwa: ".. fuel, 255, 255, 255, false ) end end end addEventHandler ( "onClientVehicleEnter", getRootElement(), stworzPaliwo ) P.S getElementData return's "false" if there is no data and not "nil"
  6. Well i don't need to use "interpolateBetween" , my way is more easy bk i need only a linear X axe move. I don't used table bk i wanted to save "onClientRender" (my way stop's the EventHandler when the move is completed , table mode will not stop the EventHandler bk he need to check if there is any new element in the table, so i can't stop it). One way would be to send a tabel and call it only once. But this way will not work if i wanna a delay between the starting time's. So i gues the table mode is only way.
  7. I am creating a costum GUI theme. (rebuild it with Dx) I made a function to animate move on X axis. All good when i call it 1 time. But when i call it 2 time's at the same time , to move 2 element's (images) at the same time , It get bugged , as far as i find it's that onClientRender it's not removed (only one of them is , every call create's one onClientRender.) function DGTAnimateStaticImage(Element,from_x,speed) local x = getElementData(Element,"x") setElementData(Element,"animation",true) setElementData(Element,"x",from_x) move_image = function() local x1 = getElementData(Element,"x") if not x1 then removeEventHandler('onClientRender',getRootElement(),move_image) end if(x1<=x) then setElementData(Element,"x",x1+speed) else removeEventHandler('onClientRender'getRootElement(),move_image) outputChatBox("removed") setElementData(Element,"animation",false) end end addEventHandler('onClientRender',getRootElement(),move_image) end
  8. Required Arguments for playSound3D playSound also can play live stream URL's , my radio is using it ....
  9. Is there any way to filter the normal rocket (lunched by hunter in DM map) from Heat Seeking rocket (created by my script). I know one way would be to add my rocket's to a table wen i create them , but it's not the best way , bk i would need to send it to the server , proccess them , and send the tabel back to all client's. It would be horible to send one table from each client, then each client would get 24 table on every Frame...... getElementsByType("Projectile") - would return both type's after that is there any way to filter them ?? THX
  10. Well you can unpack GTA:SA txd's search your object's txd then extract the image from it , after you can draw it with dxDrawImage
  11. function Resetd (thePlayer) restartResource(getResourceFromName("Escape_Area51")) restartResource(getResourceFromName("zombies")) outputChatBox("reset") end addCommandHandler ( "resetdev" , Resetd ) function Startf (thePlayer) startResource(getResourceFromName("Escape_Area51")) startResource(getResourceFromName("zombies")) outputChatBox("Started") end addCommandHandler ( "startdev" , Startf )
  12. i don't see what is missing from there. If you mean that the secound team is not showing , make shure there is no option like "hide empty team's" if there is make it off.
  13. try to convert the sec's and hour's in difrent variable's. (local sec = ,local hour =) in "String.gsub" the dot "." , as pattern mean's all character's so you will have ":::"
  14. yes i made it for w,h to . (w*0.581,h*0.491,w*0.086,h*0.049)
  15. So the problem is the next. I used the simpel relative calc mode. If on 800x600 is 200 px then , 200/800 = 0.25*ScreenW on every resolution , this is all good when it come's on x,y. When trying to use it on w,h diffrent story, if i calc it on 800*600 is a perfect circle. When i change it to 1024x.... bang the perfect circle become's an oval when it's rotated. So i think this is bk of the aspect ration , if on desktop i have 1336x768 and ingame using 1024x... there will be black side bar's bk of the aspect ration. And from there come's the whole problem. Soo i am trying to find some math solution for this but without any good find. If somebody know's how to solve this problem could tell me ??? THX
  16. Well you have 2 option's. 1: If you wanna add the pic over an object , and place it where you want in map editor then you better use shader. 2: If you wanna add that pic in 2-3 places like a sign board then you can use : getScreenFromWorldPosition getDistanceBetweenPoints3D dxDrawImage with "onClientRender" Ofc the first methode (shader) is better , less work . But if you cant make it with shader's/ you can't learn how they work , then you can try the secound methode to.
  17. function getAliveGuys ( mode )] --you call it with mode 2 if not mode then return end if mode == 1 then pAlive = { }; --table created in mode 1 for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "state" ) == "alive" ) then table.insert ( pAlive, player ); end--closed if end -- closed for return pAlive; elseif mode == 2 then -- mode 2 return #pAlive;-- returning a tabel witch one was not created bk you call mode = 2 and the table is creaded in mode 1
  18. what is "getAliveGuys(2)". what is "getDeadGuys ( )". ????? Post the full script and use "lua" tag's instead of "code"
  19. Maybe you can try to pm your idea/opinion to a modelator and ask him. P.S IDK if they would make this , bk every player can add/remove skin's from MTA. So it will need that the client download the skin from the server. With some scripting you can make custom GUI using DxDraw , i am working atm on my own one for my server.
  20. Position the window on your screen with absolute value like : 400,350 . Then check your screen resolution like : 1366x768. then relative_x = 400/1366 --(0.292) relative_y = 350/768 --(0.455) then Gui...... (ScreenW*relative_x, ScreenH*relative_y ) this will stay on the same place on every resolution.
  21. if you are speaking about , that when somebody join your server to set a gui skin for him , then no it's not possible. If you seen this on another server then it's custom made skin with dxDraw (scripting)
  22. bandi94

    shader name.

    "bullethitsmoke" thx for the link
  23. bandi94

    shader name.

    I found the exhaust smoke witch is the same as the drift smoke. But i can't find the engine smoke (when you broke your car the engine start's smoking). If somebody could tell me his name ??
×
×
  • Create New...