Jump to content
Mr. Green Gaming

Map Scripts


Recommended Posts

  • Replies 90
  • Created
  • Last Reply

Top Posters In This Topic

'Nigga' is a word black people say to each other. It's a black community thing.

There is nothing racist about it, it's just that white people shouldn't even say it.

Also, humans are so extremely stupid for the overreactment. They are saying the word is a bad thing. What do you think as a child when the news warns you not to watch because there is bad language in it? Of course. This makes you think it's a curse-word.

There is absolutely no difference in calling someone a "nigger" or "black person". But yeah, when a teacher says 'black person' or 'nigger' to a student, that's bad (although world-breaking news is going way too far).

Back ontopic, Green people!

Link to comment

Yeah that is so right... Keep on debating about the n-word, people..

Yeah, this is the right place to debate on..

How about I require all of you to script now ? :P Since you love this topic apparently

When I created this topic, I wanted that if someone asked ingame for a script I could point them to this topic and they could read all the posts and choose what scripts they liked the most..

What will that someone see now? :/ Your personal thoughts/opinions about the n-word .

Thanks for spamming my topic

Link to comment

Yeah that is so right... Keep on debating about the n-word, people..

Yeah, this is the right place to debate on..

How about I require all of you to script now ? :P Since you love this topic apparently

When I created this topic, I wanted that if someone asked ingame for a script I could point them to this topic and they could read all the posts and choose what scripts they liked the most..

What will that someone see now? :/ Your personal thoughts/opinions about the n-word .

Thanks for spamming my topic

OkOk

Script that shows the some text about this matter in-game:

local rootElement = getRootElement()
local screenWidth, screenHeight = guiGetScreenSize()

function createText ( )
dxDrawText ( "Nigger - Offensive / Nigga - Slang used amongst black people themselves", 0, 0, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown", "left", "center", false, false, false )
setTimer (remove, 15000, 1) --Text showing for 15 sec
end

function remove ()
removeEventHandler("onClientRender", rootElement, createText)
end

addEventHandler("onClientRender", rootElement, createText)

Now srsly Bin, you got any more scripts/changes in mind for the server? I liked the Alpha thing.

Another things, speaking of scripts, how do i bind text ingame?

I can bind logins, nicks but not text lol.

Tried /bind f1 text "text" and /bind f1 t "text" doesnt work. :(

Edited by FOTL.Emanuel
Link to comment

A "marker", wanted to do that some time ago.

One of my maps uses the teleport script done by bin.

addEvent('onPlayerReachCheckpoint', true)
addEventHandler('onPlayerReachCheckpoint', getRootElement(),
function(checkpoint)
if checkpoint == 26 then
x,y,z = getElementVelocity(getPedOccupiedVehicle(source))
setElementPosition(getPedOccupiedVehicle(source), 383.5244140625, 2507.4135742188, 16.289350509644)
setElementRotation(getPedOccupiedVehicle(source), 0, 0 , 90)
setElementVelocity(getPedOccupiedVehicle(source), 0,y,0)
end
end
)

Change the checkpoint that triggers teleport, coordinates and any other necessary details.

To get the exact coordinates you want the system to teleport you i suggest you place a "vehicle" (not spawn) where you want the player to be teleported to. Copy its coordinates to the script and then delete it, thats how i do it at least.

Edited by FOTL.Emanuel
Link to comment

--Speedboost--
--By-----KWKSND--

-- Speedboost pickups --
function start()
SpeedBoost = {
createMarker ( -2143.1450195313, 864.66357421875, 73.357460021973, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2143.2846679688, 919.92486572266, 130.06224060059, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2261.1362304688, 1008.3197021484, 83.069351196289, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2230.0563964844, 1093.1223144531, 79.851562500000, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.1020507813, 1369.3588867188, 55.427032470703, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.0781250000, 1548.1293945313, 61.515167236328, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.0102539063, 1712.5568847656, 67.709930419922, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2673.8496093750, 1931.8781738281, 64.152168273926, "corona", 5, 0, 0, 255, 255 ),
}
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start )
-- Add more markers to add more Speedboosts.^^^

Multiplier = 1.75 -- Change this to adjust how much boost you get, you can use decimals.

function SpeedBoost (player)
if player ~= getLocalPlayer() then return end
if getElementType(player) == "player" then
if isPedInVehicle ( player ) then
local car = getPedOccupiedVehicle(player)
if getVehicleController(car) == player then
speedx, speedy, speedz = getElementVelocity ( car ) -- get the velocity of the player
speedcnx = (speedx*Multiplier)
speedcny = (speedy*Multiplier)
speedcnz = (speedz*Multiplier)
setElementVelocity ( car, speedcnx, speedcny,speedcnz )
fixVehicle(car) -- fixes the vehicle
addVehicleUpgrade(car, 1010) -- adds nitro
playSoundFrontEnd(46)
end
end
end
end
addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost )

I use this code on City and Forest Coaster

Edited by CsenaHUN
Link to comment

--Speedboost--
--By-----KWKSND--

-- Speedboost pickups --
function start()
SpeedBoost = {
createMarker ( -2143.1450195313, 864.66357421875, 73.357460021973, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2143.2846679688, 919.92486572266, 130.06224060059, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2261.1362304688, 1008.3197021484, 83.069351196289, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2230.0563964844, 1093.1223144531, 79.851562500000, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.1020507813, 1369.3588867188, 55.427032470703, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.0781250000, 1548.1293945313, 61.515167236328, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.0102539063, 1712.5568847656, 67.709930419922, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2673.8496093750, 1931.8781738281, 64.152168273926, "corona", 5, 0, 0, 255, 255 ),
}
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start )
-- Add more markers to add more Speedboosts.^^^

Multiplier = 1.75 -- Change this to adjust how much boost you get, you can use decimals.

function SpeedBoost (player)
if player ~= getLocalPlayer() then return end
if getElementType(player) == "player" then
if isPedInVehicle ( player ) then
local car = getPedOccupiedVehicle(player)
if getVehicleController(car) == player then
speedx, speedy, speedz = getElementVelocity ( car ) -- get the velocity of the player
speedcnx = (speedx*Multiplier)
speedcny = (speedy*Multiplier)
speedcnz = (speedz*Multiplier)
setElementVelocity ( car, speedcnx, speedcny,speedcnz )
fixVehicle(car) -- fixes the vehicle
addVehicleUpgrade(car, 1010) -- adds nitro
playSoundFrontEnd(46)
end
end
end
end
addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost )

I use this code on City and Forest Coaster

How does it work? The teleport seems to hardcore for me, I'm not good at scripting at all :yeah: .

@SDK, like a marker, or some other uncollidable object.

Edited by Cookie
Link to comment

Making Csena's script easier..

Use this code


Multiplier = 1.75 -- Change this to adjust how much boost you get, you can use decimals.

function SpeedBoost (player)
if player ~= getLocalPlayer() then return end
if getElementType(player) == "player" then
if isPedInVehicle ( player ) then
local car = getPedOccupiedVehicle(player)
if getVehicleController(car) == player then
speedx, speedy, speedz = getElementVelocity ( car ) -- get the velocity of the player
speedcnx = (speedx*Multiplier)
speedcny = (speedy*Multiplier)
speedcnz = (speedz*Multiplier)
setElementVelocity ( car, speedcnx, speedcny,speedcnz )
fixVehicle(car) -- fixes the vehicle
addVehicleUpgrade(car, 1010) -- adds nitro
playSoundFrontEnd(46)
end
end
end
end
addEventHandler ( "onClientMarkerHit", getRootElement(), SpeedBoost )

Save everything as speed.lua

Put speed.lua in map archive (near the meta and .map)

Open meta.xml and add this line

<script src="speed.lua" type="client" /> --just like music :)

But the reason why I'm saying this script is easier is because you don't have to manually add the markers (like Csena's script), but instead.. You have to open the map in the map editor and add markers (it should be in the list, next to checkpoints and spawnpoints)

Notice: When you save the map with the editor it is possible that the meta.xml will fuckup, so double check everything.

Riiight, and the "MULTIPLIER" line in the code can be adjusted to your needs.

Don't put too high values

It's ok to have numbers between 1.2 and 1.8 or so

have fun

Edited by BinSlayer
Link to comment

I was thinking you would want a keybind or something :X

To change/add markers to KWKSND's script:


function start()
SpeedBoost = {
createMarker ( -2143.1450195313, 864.66357421875, 73.357460021973, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2143.2846679688, 919.92486572266, 130.06224060059, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2261.1362304688, 1008.3197021484, 83.069351196289, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2230.0563964844, 1093.1223144531, 79.851562500000, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.1020507813, 1369.3588867188, 55.427032470703, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.0781250000, 1548.1293945313, 61.515167236328, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2674.0102539063, 1712.5568847656, 67.709930419922, "corona", 5, 0, 0, 255, 255 ),
createMarker ( -2673.8496093750, 1931.8781738281, 64.152168273926, "corona", 5, 0, 0, 255, 255 ),
}
end

Every createMarker will add one speedboost

=> syntax

Link to comment
  • 2 weeks later...

Hello to all the map-makers out there :)

I'll post some scripts I have that can make your map more fun/enjoyable.

1) Checkpoint boosting.

We all know checkpoints can change your vehicle and advance you through the race, but let's give it another usage for the crazy rollercoaster maps out there! We can have the checkpoints give you a lil' boost (adjustable speed) to each racer that goes through it. Here's the script I made to do this:


local multiplier = 1.4 -- Change this to suit your needs (recommended: 1.4). If using higher values don't put many checkpoints or the server will think it is cheating (warping)
function boost()
local theVehicle = getPedOccupiedVehicle(source)
if theVehicle then
local speedx, speedy, speedz = getElementVelocity(theVehicle)
setElementVelocity(theVehicle, speedx*multiplier, speedy*multiplier, speedz*multiplier)
end
end
addEvent("onPlayerReachCheckpoint", true)
addEventHandler("onPlayerReachCheckpoint", getRootElement(), boost)

To use this script in your map, copy-paste everything into a .lua file such as speedboost.lua and put it in the map archive. Then edit your meta.xml to add the following: <script src="speedboost.lua" /> Also, do test the map WITH the script before you send it to us and if the speed doesn't please you, change the multiplier value. Ranges like from 1.1 to 1.8 or so :)

Hey Bin,

how to create such checkpoit in map?

Link to comment

I dont know why dont you like the first speedboost script, but here is an other one:


addEvent("onPlayerReachCheckpoint")
addEventHandler("onPlayerReachCheckpoint", getRootElement(),
function(cp, time)
if cp == 1 or cp == 2 or cp == 3 or cp == 4 then
local vehicle = getPedOccupiedVehicle(source)
local vx, vy, vz = getElementVelocity(vehicle)
setElementVelocity(vehicle, vx * 2, vy * 2, vz)
playSoundFrontEnd(source, 18)
end
end
)

Save as speedboost.lua.

Put this line in map meta:

<script src="speedboost.lua" type="server" />

You can change this two line:

Mark all cps where you need speedboost

if cp == 1 or cp == 2 or cp == 3 or cp == 4 then

How much speedboost players got

setElementVelocity(vehicle, vx * 2, vy * 2, vz)

You can also add this two line if you want:


fixVehicle(vehicle) -- fixes the vehicle
addVehicleUpgrade(vehicle, 1010) -- adds nitro

Link to comment

I dont know why dont you like the first speedboost script, but here is an other one:


addEvent("onPlayerReachCheckpoint")
addEventHandler("onPlayerReachCheckpoint", getRootElement(),
function(cp, time)
if cp == 1 or cp == 2 or cp == 3 or cp == 4 then
local vehicle = getPedOccupiedVehicle(source)
local vx, vy, vz = getElementVelocity(vehicle)
setElementVelocity(vehicle, vx * 2, vy * 2, vz)
playSoundFrontEnd(source, 18)
end
end
)

Save as speedboost.lua.

Put this line in map meta:

<script src="speedboost.lua" type="server" />

You can change this two line:

Mark all cps where you need speedboost

if cp == 1 or cp == 2 or cp == 3 or cp == 4 then

How much speedboost players got

setElementVelocity(vehicle, vx * 2, vy * 2, vz)

You can also add this two line if you want:


fixVehicle(vehicle) -- fixes the vehicle
addVehicleUpgrade(vehicle, 1010) -- adds nitro

This one is better, you can choose which cps boost your cars :D

Link to comment
  • 3 weeks later...

Speedboosting at will.

You are able to speedboost at will by pressing the "X" button. After you've pressed it, there will be a cooldown period of 8 seconds during which you will not be able to speedboost again.

It comes with a nice text that lets you know whether it's cooling down or it's usable.

Installation for your map:

Go to: http://www.xoti.net/uploads/boost_a749.lua

Select and copy everything, paste it in a boost.lua script. Put the boost.lua script in the map archive. Open meta.xml and right before the </meta> tag, add this line:

<script src="boost.lua" type="client" />

have fun

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...