Jump to content

[PRIVATE]About New Cars Roads Scripts


ProDMRac3r

Recommended Posts

Scripts In Mapping

Create Explosive

Open ur notepad and put this code:

Code:

function explosion () 
  
        createExplosion( x, y, z, kinds of explosions) --change x,y,z and kinds of explosions 
        setTimer (explosion, 5000, 1) --5000 ,1 = 1 explosion in 5 seconds,if u want 1 explosion in 10 seconds =10000, 1 
  
end 
  
  
  
  
  
  
addEventHandler( "onClientResourceStart", resourceRoot, explosion ) 

Grenade

1: Molotov

2: Rocket

3: Rocket Weak

4: Car

5: Car Quick

6: Boat

7: Heli

8: Mine

9: Object

10: Tank Grenade

11: Small

12: Tiny --kinds of explosions

Now save it as explosion.lua

Go to meta.xml of ur map and open it using notepad and paste this code:

Code:

Right Way:

<meta> 
<script src="explosion.lua" type="client" /> 
<info gamemodes="race" type="map" version="1.0.0" /> 
<map src="Watch Me Die.map" dimension="0" /> 
<settings> 
  

Wrong Way:

<meta> 
<info gamemodes="race" type="map" version="1.0.0" /> 
<script src="explosion.lua" type="client" /> 
<map src="Watch Me Die.map" dimension="0" /> 
<settings> 
  

Open Your meta.xml In Your Map Folder

And Copy This

And Open Notepad Copy This

Set Sky Color

  
function startclient() 
setSkyGradient(0, 100, 100, 200, 200, 200) 
end 
addEventHandler("onClientResourceStart", resourceRoot, startclient) 
  

Set Water Color

  
function startclient() 
setWaterColor(0, 200, 100) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), startclient) 
  

Create Fire

function startclient () 
createFire( 3840.5, -2031.5, 3, 40) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), startclient ) 

Colisions

function startClient() 
shade = createObject(1225, 3840.5, -2031.5, 2, 0, 0, 0) 
setElementCollisionsEnabled(shade, false) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), startClient) 

Hydrant Effect

function hydrant() 
hydrant1 = fxAddWaterHydrant(3840.5, -2031.5, 3, 40) 
setTimer(hydrant, 1000, 1) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), hydrant)  

Custom Object You May Have TXD Workshop And Open vgncarshade1.txd AND Replace Pic Then Copy new vgncarshade1.txd To Map Folder

function onResourceStart() 
vgncarshade1 = engineLoadTXD("vgncarshade1.txd") 
engineImportTXD(vgncarshade1, 345Click here to enlarge 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)  

Create Teleport Marker

marker = createMarker(3840.5, -2031.5, 3, "corona", 3.5, 255, 0, 0, 255) 
  
function teleport(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source == marker then 
setElementPosition(vehicle, 3843.7, -2021, 2.2) 
setVehicleFrozen(vehicle, true) 
setTimer(setVehicleFrozen, 1000, 1, vehicle, false) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), teleport)  

Chat Box

function startclient() 
outputChatBox("==========THIS IS THE SCRIPT==========", 255, 0, 0, true) 
end 
addEventHandler("onClientResourceStart", getRootElement(), startclient)  

Create Ped

function pedLoad() 
ped1 = createPed(90, 3840.5, -2031.5, 3) 
setPedRotation(ped1, 60) 
setTimer(pedAnimations, 2500, 1) 
end 
addEventHandler("onResourceStart", getRootElement(), pedLoad) 
  
function pedAnimations() 
giveWeapon(ped1, 38, 2500, true) 
setPedAnimation(ped1, "STRIP", "strip_e") 
end  

Push Player

marker1 = createMarker(3840.5, -2031.5, 3, "corona", 3.5, 255, 0, 0, 255) 
  
function MarkerHit(player) 
if getElementType=="player" then 
local vehicle = getPedOccupiedVehicle(player) 
if source == marker1 then 
setElementVelocity(vehicle, 0, 0, 1.5) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit)  

Change Gravity

marker = createMarker(3640, 6210, 52, "corona", 25, 0, 0, 0, 200) 
  
function gravity(player) 
if getElementType(player)=="player" then 
if source == marker then 
vehicle = getPedOccupiedVehicle(player) 
x,y,z = getElementPosition(player) 
setVehicleGravityPoint(vehicle, x, y, z-1000, 1) -- You need to test it many times until you understand how it works. 
end 
end 
end 
  
function setVehicleGravityPoint(targetVehicle, pointX, pointY, pointZ, strength) 
if isElement(targetVehicle) and getElementType(targetVehicle)=="vehicle" then 
local vehicleX,vehicleY,vehicleZ = getElementPosition(targetVehicle) 
local vectorX = vehicleX-pointX 
local vectorY = vehicleY-pointY 
local vectorZ = vehicleZ-pointZ 
local length = (vectorX^2 + vectorY^2 + vectorZ^2)^0.5 
local propX = vectorX^2 / length^2 
local propY = vectorY^2 / length^2 
local propZ = vectorZ^2 / length^2 
local finalX = (strength^2 * propX)^0.5 
local finalY = (strength^2 * propY)^0.5 
local finalZ = (strength^2 * propZ)^0.5 
if vectorX > 0 then finalX = finalX * -1 end 
if vectorY > 0 then finalY = finalY * -1 end 
if vectorZ > 0 then finalZ = finalZ * -1 end 
return setVehicleGravity(targetVehicle, finalX, finalY, finalZ) 
end 
return false 
end 
addEventHandler("onClientMarkerHit", getRootElement(), gravity)  

BLOW Vehicle

marker = createMarker(3823, -2024, 2.5, "corona", 5, 255, 0, 255, 255) 
  
function boom(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source == marker then 
blowVehicle(vehicle) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), boom)  

Create Ring Of Fire

function fire() 
createObject(13641, 3825.7, -2026, 3) 
setTimer(ogien, 2500, 0) 
x,y,z = 3825.7, -2026, 3 
end 
addEventHandler("onClientResourceStart", getRootElement(), fire) 
  
function ogien() 
createFire(x+12, y, z+2.5, 2) 
createFire(x+12, y, z+17, 2) 
createFire(x+12, y+7.5, z+8.5, 2) 
createFire(x+12, y-6.5, z+8.5, 2) 
createFire(x+12, y-5.5, z+12.5, 2) 
createFire(x+12, y-4, z+13.5, 2) 
createFire(x+12, y-2, z+15.5, 2) 
createFire(x+12, y+7.5, z+8.5, 2) 
createFire(x+12, y+6.5, z+12.5, 2) 
createFire(x+12, y+5, z+13.5, 2) 
createFire(x+12, y+3, z+15.5, 2) 
createFire(x+12, y+6.5, z+6.5, 2) 
createFire(x+12, y+4.5, z+4.5, 2) 
createFire(x+12, y+3.5, z+3.5, 2) 
createFire(x+12, y+2.5, z+3.5, 2) 
createFire(x+12, y-5.5, z+6.5, 2) 
createFire(x+12, y-4, z+4.5, 2) 
createFire(x+12, y-3.5, z+3.5, 2) 
createFire(x+12, y-2.5, z+3.5, 2) 
end  

Vehicle Upgrades

  
local marker = createMarker(3823, -2024, 2.5, "corona", 5, 0, 255, 255, 255) 
  
function fixx(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source == marker then 
addVehicleUpgrade(vehicle, 1164) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), fixx) 
  

Fix Vehicle

marker = createMarker(3823, -2024, 2.5, "corona", 5, 255, 255, 0, 255) 
  
function fixx(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source == marker then 
fixVehicle(vehicle) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), fixx)  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...