Jump to content

Help Us Plz And Thank u


Haze

Recommended Posts

Posted

Hi Everyone How Are You Im back Agine with New Question or New Script and i Hope that u Help me i Really Trust You

this script make Hydra go faster i made it with my Frined the problem that this script is not working can u Help us Guys and thank u

function sonicboom () 
  
speedx, speedy, speedz = getElementVelocity ( getPlayerFromName ( "someguy" ) ) 
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5)  
kmh = actualspeed * 180 
outputChatBox ( "Someguy's current velocity: " .. mps .. " metres per second." ) 
    if kmh = < 130 then 
        playSound("boom.mp3") 
        setVehicleHandling(520, "maxVelocity", 200) 
    end 
end 
  
  bindKey ( "lshift", "down", sonicboom )  

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted
function sonicboom () 
speedx, speedy, speedz = getElementVelocity ( getPlayerFromName ( "someguy" ) ) 
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) 
kmh = actualspeed * 180 
outputChatBox ( "Someguy's current velocity: " .. mps .. " metres per second." ) 
    if kmh >= 130 then 
        playSound("boom.mp3") 
        setVehicleHandling(520, "maxVelocity", 200) 
    end 
end 
bindKey ( "lshift", "down", sonicboom )  

P.S: When you use outputChatBox in client side, none else but the client will see it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Its not working :( dude

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted
function sonicboom () 
speedx, speedy, speedz = getElementVelocity ( getPlayerFromName ( "someguy" ) ) 
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) 
kmh = actualspeed * 180 
outputChatBox ( "Someguy's current velocity: " .. kmh .. " metres per second." ) 
    if kmh >= 130 then 
        playSound("boom.mp3") 
        setVehicleHandling(520, "maxVelocity", 200) 
    end 
end 
bindKey ( "lshift", "down", sonicboom )  

try this

Posted

setVehicleHandling requires a vehicle element, not a vehicle model if I'm right.

function sonicboom () 
speedx, speedy, speedz = getElementVelocity ( getPlayerFromName ( "someguy" ) ) 
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) 
kmh = actualspeed * 180 
outputChatBox ( "Someguy's current velocity: " .. mps .. " metres per second." ) 
    if kmh >= 130 then 
        playSound("boom.mp3") 
        setVehicleHandling(getPedOccupiedVehicle(getPlayerFromName ( "someguy" )), "maxVelocity", 200) 
    end 
end 
bindKey ( "lshift", "down", sonicboom )  

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No m8 its not working i dont know what is the problem plz Help me

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

Could you give more information about WHAT is not working? you just say "Its not working I dont know what is the problem plz Help me" and nothing else, does it output errors in the debugscript (/debugscript 3)?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

WARNING: sb\sonicboom.lua:11: Bad argument @ 'bindKey'

i got this from the debugscript 3 plz Help guys and Thank u

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

This script is client side, right?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i put it Server :P i think it should be Clinet no ??

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

playSound is only client side.. and bindKey doesn't work that way in server side.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i tryd to make it Clinet side but also its not working

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

ok dude i made it Clinet Side can u Help me in the code Castilo

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

Do you know how this script works? it's suposed to get the velocity & so on from a player called "Someguy", do you want that?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I know i calld my self Someguy but i cant see the Hydra fly faster or the SoundPlay

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

-- client side:

addEvent("playSonicSound",true) 
addEventHandler("playSonicSound",root, 
function () 
    if isElement(sound) then destroyElement(sound) end 
    sound = playSound("boom.mp3") 
end) 

-- server side:

addEventHandler("onResourceStart",resourceRoot, 
function () 
    for index, player in pairs(getElementsByType("player")) do 
        bindKey ( player, "lshift", "down", sonicboom ) 
    end 
end) 
  
addEventHandler("onPlayerJoin",root, 
function () 
    bindKey ( source, "lshift", "down", sonicboom ) 
end) 
  
function sonicboom (player) 
if not isPedInVehicle(player) then return end 
speedx, speedy, speedz = getElementVelocity ( getPedOccupiedVehicle(player) ) 
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) 
kmh = actualspeed * 180 
outputChatBox ( getPlayerName(player) .." current velocity: " .. kmh .. " metres per second." ) 
    if kmh >= 130 then 
        triggerClientEvent(player,"playSonicSound",player) 
        setVehicleHandling(getPedOccupiedVehicle(player), "maxVelocity", 200) 
    end 
end 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I CAN here the sound but i cant see that the Hydra go Faster

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

Well, the script himself works, but I have no idea how handling stuff works. Maybe you should use velocity instead of handling.

-- client side:

addEvent("playSonicSound",true) 
addEventHandler("playSonicSound",root, 
function () 
    if isElement(sound) then destroyElement(sound) end 
    sound = playSound("boom.mp3") 
end) 

-- server side:

addEventHandler("onResourceStart",resourceRoot, 
function () 
    for index, player in pairs(getElementsByType("player")) do 
        bindKey ( player, "lshift", "down", sonicboom ) 
    end 
end) 
  
addEventHandler("onPlayerJoin",root, 
function () 
    bindKey ( source, "lshift", "down", sonicboom ) 
end) 
  
function sonicboom (player) 
if not isPedInVehicle(player) then return end 
local speedx, speedy, speedz = getElementVelocity ( getPedOccupiedVehicle(player) ) 
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) 
kmh = actualspeed * 180 
outputChatBox ( getPlayerName(player) .." current velocity: " .. kmh .. " metres per second." ) 
    if kmh >= 130 then 
        triggerClientEvent(player,"playSonicSound",player) 
        setElementVelocity ( getPedOccupiedVehicle(player), speedx*1.05, speedy*1.05, speedz*1.05) 
    end 
end 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Its not working m8 any Way Thanks for Help Castilo hope someone come and Solve it

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

Funny to see how it takes almost 20 replys to know setVehicleHandling does NOT support boats, planes and helicopters yet. You can change the values, and some like suspension and steering lock will work, but planes, boats and helicopters have also special handling which are not able to get changed yet.

To make a hydra faster, use setElementSpeed in onClientPreRender, or wait till MTA 1.2 where there might be suport for special handling.

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...