-
Posts
1,089 -
Joined
-
Last visited
Everything posted by Xwad
-
Hi i want to change an object skin for my server but it dosent work! Pls help script.lua function replaceskin() txd = engineLoadTXD( "TXD/sandbags.txd" ) col = engineLoadCOL( "COL/sandbags.col" ) dff = engineLoadDFF( "DFF/sandbags.dff", 2935 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceskin) Meta.xml "Xwad" version="1.0" type="script"/>
-
Is it so good? local weapons = { [38] = false, -- minigun [33] = false, -- country rifle [34] = false, -- sniper rifle [30] = false, -- AK-47 [31] = false, -- M4 } function VehicleFire(theAttacker, theWeapon) if (weapon and getElementModel(source) == 601 then if (weapons[weapon]) then cancelEvent() end end addEventHandler("onClientVehicleDemage",getRootElement(),VehicleFire)
-
Hi. What functions need i to disable the bullet demage on S.W.A.T. vehicle? Thanks.
-
Hi i use a gui script that makes possible to choose from 2 team. I set the friendly fire to false but its not working:( I want to make that the friendly fire will be only disabled when to players are in 2 different category (team). But the problem is that the friendly fire only works when 2 players one class. Here is a part of the script. "GERMAN" > "MEDIC" friendlyfire="false" > "Medic's can heal other players." /> "0" green="0" blue="205" /> "SS-soldier" id="10" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier2" id="11" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "46" ammo="1" /> "16" ammo="1" /> "23" ammo="24" /> "29" ammo="32" /> "41" ammo="5000" /> "-2098.5178222656" y="-2079.3725585938" z="71.461433410645" /> "-2313.4711914063" y="-2294.9970703125" z="50.461433410645" /> "ENGINEER" friendlyfire="false" > "Engineer's can repair vehicles."/> "0" green="0" blue="205" /> "SS-soldier2" id="11" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier3" id="12" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "46" ammo="1" /> "16" ammo="1" /> "23" ammo="24" /> "9" ammo="0" /> "29" ammo="32" /> "-2098.5178222656" y="-2079.3725585938" z="71.461433410645" /> "-2313.4711914063" y="-2294.9970703125" z="50.461433410645" /> "AMERICA" > "MEDIC" friendlyfire="false" > "Medics can heal players." /> "102" green="51" blue="51" /> "US Marine" id="30" > "753.76" y="1972.45" z="5.69" rot="265.76" /> "US Marine2" id="31" > "753.76" y="1972.45" z="5.69" rot="265.76" /> "46" ammo="1" /> "16" ammo="30" /> "28" ammo="80" /> "41" ammo="5000" /> "756.45" y="1935.92" z="17.78" /> "772.32" y="1979.11" z="5.34" /> "ENGINEER" friendlyfire="false" > "Engineers can repair vehicles." /> "255" green="102" blue="51" /> "US Marine" id="30" > "753.76" y="1972.45" z="5.69" rot="265.76" /> "US Marine2" id="31" > "753.76" y="1972.45" z="5.69" rot="265.76" /> "46" ammo="1" /> "16" ammo="1" /> "22" ammo="30" /> "9" ammo="0" /> "28" ammo="80" /> "2065.88" y="2201.93" z="25.8" /> "2083.40" y="2224.30" z="12.0" />
-
is there server side correct? function onClientExplosion(x,y,z,theType) if (weapon == 35) or if (weapon == 36) then setElementHealth(source,getElementHealth(source) - 350) end addEvent("onClientPlayerWeaponFire", true) addEventHandler("onClientPlayerWeaponFire", getRootElement(), onClientExplosion)
-
Hi i want to make a vehicle shop. Its working the only problem is that when i buy a car then he alwys give 5 fbi car:/ client side script local vehicleMarker = createMarker(-2404.1486816406, -2201.865234375, 32.2,"cylinder",1,255,255,255) function vehicleGUI() vehicleGUI = guiCreateWindow(277, 204, 269, 266, "Vehicle Shop", false) guiWindowSetSizable(vehicleGUI, false) guiSetVisible(vehicleGUI,false) vehicleFBITruck = guiCreateButton(9, 19, 250, 40, "Sd.Kfz.222", false, vehicleGUI) vehiclePatriot = guiCreateButton(9, 69, 250, 40, "VW type 82", false, vehicleGUI) vehicleFlatbed = guiCreateButton(9, 119, 250, 40, "Sd.Kfz.251", false, vehicleGUI) vehicleRihno = guiCreateButton(9, 168, 250, 40, "Tiger Ausf. E", false, vehicleGUI) vehicleClose = guiCreateButton(178, 218, 81, 27, "Close", false, vehicleGUI) end addEventHandler("onClientResourceStart",resourceRoot,vehicleGUI) function playerOnMarker() if isElementWithinMarker(localPlayer, vehicleMarker) then guiSetVisible(vehicleGUI, true) showCursor( true ) end end addEventHandler("onClientMarkerHit", vehicleMarker, playerOnMarker) function closeGUI() if source == vehicleClose then guiSetVisible(vehicleGUI,false) showCursor(false) end end addEventHandler("onClientGUIClick",getRootElement(),closeGUI) function vehicleBuy() if source == vehicleFBITruck then triggerServerEvent("onVehicleBought",localPlayer) guiSetVisible(vehicleGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleBuy) function vehicleBuy() if source == vehicleFlatbed then triggerServerEvent("onVehicleBought",localPlayer) guiSetVisible(vehicleGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleBuy) function vehicleBuy3() if source == vehiclePatriot then triggerServerEvent("onVehicleBought",localPlayer) guiSetVisible(vehicleGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleBuy3) function vehicleRhino() if source == vehicleRhino then triggerServerEvent("onVehicleBought",localPlayer) guiSetVisible(vehicleGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleRhino) server side script function vehicleFBITruck() if ( getPlayerMoney (source) >= 800 ) then takePlayerMoney(source, 800) outputChatBox("You have bought Sd.Kfz.222 vehicle.",source) local x,y,z = getElementPosition(source) local veh = createVehicle(528,x,y,z+5) warpPedIntoVehicle(source, veh) else outputChatBox('You dont have enough money to buy this Vehicle. 800$ ', source, 255, 0, 0 ) end end addEvent("onVehicleBought", true) addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck) function vehicleFlatbed() if ( getPlayerMoney (source) >= 1000 ) then takePlayerMoney(source, 1000) outputChatBox("You have bought Sd.Kfz.251 vehicle.",source) local x,y,z = getElementPosition(source) local veh = createVehicle(455,x,y,z+5) warpPedIntoVehicle(source, veh) else outputChatBox('You dont have enough money to buy this Vehicle. 1000$', source, 255, 0, 0 ) end end addEvent("onVehicleBought", true) addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck) function vehiclePatriot() if ( getPlayerMoney (source) >= 500 ) then takePlayerMoney(source, 500) outputChatBox("You have bought VW type 82 vehicle.",source) local x,y,z = getElementPosition(source) local veh = createVehicle(470,x,y,z+5) warpPedIntoVehicle(source, veh) else outputChatBox('You dont have enough money to buy this Vehicle. 500$', source, 255, 0, 0 ) end end addEvent("onVehicleBought", true) addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck) function vehicleRhino() if ( getPlayerMoney (source) >= 5000 ) then takePlayerMoney(source, 5000) outputChatBox("You have bought Tiger Ausf. E vehicle.",source) local x,y,z = getElementPosition(source) local veh = createVehicle(432,x,y,z+5) warpPedIntoVehicle(source, veh) else outputChatBox('You dont have enough money to buy this Vehicle. 5000$', source, 255, 0, 0 ) end end addEvent("onVehicleBought", true) addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck)
-
this script allows to heal players when i hit with spraycan. but not working:/
-
one more question. Is this server side? function healFlowers (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if ( theHealth > 95 ) then --checks clients health end else if (attackerweapon == 41) and (loss > 1) and ( theHealth < 95 ) then setElementHealth ( source, theHealth+17 ) givePlayerMoney (attacker, 1.7*theHealth) end end end addEventHandler ("onPlayerDamage", getRootElement(), healFlowers )
-
That is what i made i think its not good:/ Can you help me a little bit to correct the failures? local weaponsToDamageVehicle = { [9] = true } function handleVehicleDamage(attacker, weapon, loss, x, y, z, tyre) if (attackerweapon == 41) and (loss > 1) and ( theHealth < 95 ) then setVehicleHealth ( source, theHealth+17 ) fixVehicle ( vehicleValue ) end addEventHandler("onClientVehicleDamage", root, handleVehicleDamage)
-
Hi. How can I make a script that allows me to repair a vehicle with a chain saw when I hit the vehicle?
-
ohh yes i forgot it boom = { [35]=true, [36]=true, [37]=true, [38]=true, [16]=true, [17]=true, [18]=true, [39]=true, } addEventHandler( "onClientPlayerWeaponFire", root, function( weapon, ammo, clip, , , _, element ) local target = element if getElementType( target ) == "vehicle" then local model = getElementModel( target ) if model == 432 and boom[ weapon ] then blowVehicle( target ) end end end )
-
Hi I got a script that allows to demage the rhino with explosions but it does not work.. Why?is it client side?
-
Cool I made it with gui and it works:D thanks!
-
I dont mean gui. I mean for example there are 2 teams. American and Russian. If I enter the Amercian team then I can only choose american skins. And if I enter Russian team then I can only choose russian skins.
-
Hi please help. On my server are 2 teams. And i want make a script that makes possible that when i choose a team after that i can choose a skin. Forexample: There are 2 teams. police and terorists. And forexample i choose police team then after that i can choose a skin police man or soldier. But if i choose terorists team then i cant choose policeman or soldier only 2 other skins.
-
Hi i need a script that makes possible that when a player get in a vehicle then the other player cant open the door, only if he press g. Can you give the functions for this script? Or is there any rescource like this? Thanks.
-
Hi. Can you please show me a server host where they help me creating scripts if I host a server?
-
Thanks for for your answer Einheit! So is there no funtion that makes demage the rhino with explosions?
-
I didnt ask you to make a script. But thanks.