Jump to content

Xwad

Members
  • Posts

    1,089
  • Joined

  • Last visited

Everything posted by Xwad

  1. Xwad

    gun tower

    yeah i tryed i cant make it:(
  2. Xwad

    gun tower

    is it possible to change the s.w.a.t. tank gun tower rotation speed?
  3. shit its bugging again!! I play and after a few minutes the sound dont works anymore and this is the debug script: WARNING: sound/client.lua:9 Bad 'sound/player' pointer @ 'setSoundPaused'(1) and if i press w then it says WARNING: sound/client.lua:16 Bad 'sound/player' pointer @ 'setSoundPaused'(1) pls help!
  4. https://www.google.hu/search?q=shunt&es ... YUCh0cKwAh XDDDDD
  5. Hi i set the speed for a tank on my server to 22. But i have a problem . The setElementalVelocity is only working when i go foward:/ How can i set the speed when the vehicle shunt? i use this : setModelHandling(432, "maxVelocity", 22)
  6. Xwad

    Anti teamkill

    Thank you! I go try to make it!but meantime thanks.
  7. Xwad

    Anti teamkill

    Here is the script but i dont know how to cancel the event when the rhino is shooting:/ cleint.lua addEventHandler ( "onClientExplosion", root, function ( x, y, z ) for i, v in ipairs ( getElementsByType ( "vehicle" ) ) do local vx, vy, vz = getElementPosition ( v ); if ( getDistanceBetweenPoints3D ( x, y, z, vx, vy, vz ) <= 20 and getElementModel ( v ) == 432 ) then triggerServerEvent ( "OnRhinoDamageFromExplosion", v, (20 / getDistanceBetweenPoints3D ( x, y, z, vx, vy, vz ))*13 ); end end end ) server.lua addEvent ( "OnRhinoDamageFromExplosion", true ); addEventHandler ( "OnRhinoDamageFromExplosion", root, function ( d ) setElementHealth ( source, getElementHealth ( source ) - d ); end );
  8. Xwad

    Anti teamkill

    But i made a script that makes possible that explosion can demage tanks..
  9. nad can i aim with sniper scope in vehicle?
  10. noo you dont understand me. I want to use it like a sniper scope just in vehicle
  11. but i dont want to hide the player i just want to zoom. You know for example world of tanks . When you in the tank and press mouse 2 then it will zoom with a scope
  12. Xwad

    Anti teamkill

    not wroking:/ Maybe can it make by teams? i mean if there are 2 teams and the team mate shoots the teammate then he will not be demaged?
  13. finaly now its working! tanks again!!
  14. now its working but ts another problem again my god. When i die the sound dont stops:/
  15. local sound setTimer(function() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local vx,vy,vz = getElementVelocity(vehicle) if vx+vy+vz == 0 then if sound then setSoundPaused(sound,true) end else if not sound then sound = playSound("sounds/sound.mp3") setSoundVolume(sound, 0.1) else setSoundPaused(sound,false) end end elseif sound then setSoundPaused(sound,true) end end,1000,0) function stopSound() setSoundPaused(sound, true) end addEventHandler("onClientPlayerWasted", root, stopSound) function Plane_sound() if getElementModel(source) == 476 then setSoundPaused(sound,true) end end addEventHandler("onClientVehicleEnter", root, Plane_sound)
  16. last last last question i wanted to make that when i drive the rustler then the sound will not start but its not working i added this to the script function Plane_sound() if getElementModel(source) == 476 then setSoundPaused(sound,true) end end
  17. I etited the script a littlebit but its still not working.. I want to make that if a player source the plane then the script will give the plane by checking the players team. I mean if the player is in USA team then he will get the vehicle 476 and if he is in axis team then he will get the vehicle 446. debugscript: ERROR (client) Xwad triggered server side event onClientBuyWeapon but event is not added to serverside i dont know why is that i added the serverside event.. client function CreateShopWindow() ShopWindow = guiCreateWindow(175,150,450,320,"BONUS shop",false) local price_porrete = "5.000" btn_buy_porrete = guiCreateButton(29,140,60,15,price_porrete,false,ShopWindow) addEventHandler("onClientGUIClick", btn_buy_porrete, BuyWeapon) guiCreateStaticImage(30,80,60,60,"images/3.png", false,ShopWindow ) guiWindowSetSizable(ShopWindow,false) guiSetVisible(ShopWindow,false) end addEventHandler("onClientResourceStart", getRootElement(), CreateShopWindow) function BuyWeapon(button, state) if (button == "left") then if(source == btn_buy_porrete) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete") end end end function ShowGUI ( ) guiSetVisible ( ShopWindow, not guiGetVisible ( ShopWindow ) ) showCursor ( not isCursorShowing( ) ) end bindKey ( "F2","down", ShowGUI ) server function BuyWeaponOnServer(weapon_name) player_money = getPlayerMoney(source) player_account = getPlayerAccount(source) local price_porrete = "2500" if(weapon_name == "weapon_porrete") then local USAteam = getTeamFromName("USA") if (USAteam) then if(player_money >= tonumber(price_porrete)) then takePlayerMoney(source, tonumber(price_porrete)) local x,y,z = getElementPosition(source) local vehicle = createVehicle(476,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(source,vehicle) outputChatBox("You have bought a plane.", source, 0, 255, 0) else local Axisteam = getTeamFromName("Axis") if (Axisteam) then if(player_money >= tonumber(price_porrete)) then takePlayerMoney(source, tonumber(price_porrete)) local x,y,z = getElementPosition(source) local vehicle = createVehicle(446,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(source,vehicle) outputChatBox("You have bought a plane.", source, 0, 255, 0) else outputChatBox("You dont have enough money to buy a plane.", source, 255, 0, 0) end end end addEvent("onClientBuyWeapon", true) addEventHandler("onClientBuyWeapon", getRootElement(), BuyWeaponOnServer)
  18. but i want to make that if im in the tanks and press mouse2 then it will aim like a sniper
  19. But setCameraMatrix is for set the camera to a fix point no? i want to use this crosshair like a sniper crosshair but in rhino vehicle
  20. ok i fixed but there is a problem that i still cant fix. Its the camera zoom. When i press mouse2 then itt will show the crosshair but its not zooming and i can see my ped:/ what functions need i use for that?
  21. Sorry guys if i did something wrong..
  22. Thanks TheSmart now its working:D i just forget to change false to true..
×
×
  • Create New...