Lua Scripts/Questions/Help
6,770 replies @Fn_Nemesis You can't necessarily change it so that, instead of bullets you get grenade launcher "bullets", but you could make it so that, when you shoot a m4, it creates an explosion a set distance in front of you, or where the bullet hits. So you could do something like this, so that it explodes when it hits a player.
i need a simple menu script.. when i press f3 i can buy ak47 for 4000$ and m4a1 for 4500$
There will always be someone better than you.
omg... i can't turkish or german or any more language except indo and english T_T
how i translate it?
use web?
use dictionary?
find ppl who can translate it?
omg.. my english bad too
how i translate it?



omg.. my english bad too
How i make an explosion when i hit another player?
something like
something like
Code:
1
2
3
4
5
6
2
3
4
5
6
addhook("hit","explosion")
addhook("function","bomb")
function explosion(id)
function bomb(id,action)
if weapon id == 30 then
if action == 1 then --- i dont know what else...
addhook("function","bomb")
function explosion(id)
function bomb(id,action)
if weapon id == 30 then
if action == 1 then --- i dont know what else...
edited 3×, last 27.12.10 10:02:15 pm
How to make script! WHO make it from me? pls. (In this script me need to include:[Vips, Mods with attributes(HATS)], vote map pressing "F4" and 3 rounds for all maps, and when a guy takes the flag say it to him:"Go win now!" and destroy supplies if ther are upgraded(and say: Supplies wil be DESTROYED if they are upgraded! with white color!) pls ?
|MD| Construction | 85.25.34.242:36963 - Enter all for VIPS, MODS etc

27.12.10 01:58:21 pm
I need to do this:
When you buy an handgun (USP for esample) instead of charging the pistol holding pose it make chareges the zombie pose, but only for one handgun not for all.
Can I do this?
When you buy an handgun (USP for esample) instead of charging the pistol holding pose it make chareges the zombie pose, but only for one handgun not for all.
Can I do this?
edited 2×, last 28.12.10 11:02:14 am
27.12.10 02:43:58 pm
Hello. I know this has been discused but tell me once again how to do this:
I want to set the maximum gate fields that can be built using lua, so it would look like this:
parse("mp_building_limit "Gate Field" 777777")
but then it gives error that can't set gate field limit. Please help, where am I wrong?
I want to set the maximum gate fields that can be built using lua, so it would look like this:
parse("mp_building_limit "Gate Field" 777777")
but then it gives error that can't set gate field limit. Please help, where am I wrong?
Code:
1
parse('mp_building_limit "Gate Field" "777777"')
You can't include " in a prse that is using " to contain it's commands. Use a ' in the future

27.12.10 07:50:25 pm
-F1r3Z has written:
I have a question at lua
1. How to add level that saves when logged in usgn?
1. How to add level that saves when logged in usgn?
Need the rest of the script to tell you...
Else I can't do more than confuse you...
How i can make when a X gun shoot's it's sounds 2 different sounds?
Like: The normal shoot sound & some song.
But the song isn't everywhere. Just on a X place near the guy who shoots
Like: The normal shoot sound & some song.
But the song isn't everywhere. Just on a X place near the guy who shoots
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function sv_sound3(x,y,sound)
for i,id in pairs(player(0,"table")) do
if math.sqrt((x - player(id,"x"))^2 + (y- player(id,"y"))^2) < 300 then
parse([[sv_sound2 ]]..id..[[ ]]..sound)
end
end
end
addhook([[attack]],[[attacker]])
function attacker(id)
local wpn = player(id,"weapontype")
if wpn == 1 then --USP?
sv_sound3(player(id,"x"),player(id,"y"),"sfx/thesound.ogg")
end
end
for i,id in pairs(player(0,"table")) do
if math.sqrt((x - player(id,"x"))^2 + (y- player(id,"y"))^2) < 300 then
parse([[sv_sound2 ]]..id..[[ ]]..sound)
end
end
end
addhook([[attack]],[[attacker]])
function attacker(id)
local wpn = player(id,"weapontype")
if wpn == 1 then --USP?
sv_sound3(player(id,"x"),player(id,"y"),"sfx/thesound.ogg")
end
end
idk if it works, did it from scratch.
for "sfx/thesound.ogg" insert the path of your sound file
CoolioG has written:
So, you just don't want any original ideas for your RP server and instead want to use the same old mechanics that have been used for decades.
Good show, Chap. Good show.
weed_muffin has written:
ohey guys
i have a RP server and it needs multiple things.
1st: i need help with arresting people. like, if you hit someone with a claw, it spawns them to jail? it'd be cool to have a f3 menu with instaequip, actions whitch includes teleport and set arrest point
2nd: i need admin gun mods, like sg552 giving you a shop license, claw arresting and so on.
please help me out?

i have a RP server and it needs multiple things.
1st: i need help with arresting people. like, if you hit someone with a claw, it spawns them to jail? it'd be cool to have a f3 menu with instaequip, actions whitch includes teleport and set arrest point

2nd: i need admin gun mods, like sg552 giving you a shop license, claw arresting and so on.
please help me out?
So, you just don't want any original ideas for your RP server and instead want to use the same old mechanics that have been used for decades.
Good show, Chap. Good show.
thanks, mate.
how about you help me with the imprisonment script, let's say a jailing pistol.
cause i'm working on my map, and some people might even WANT to go to prison.
Quote:
How i make an explosion when i hit a player?
something like
something like
Code:
1
2
3
4
5
6
2
3
4
5
6
addhook("hit","explosion")
addhook("function","bomb")
function explosion(id)
function bomb(id,action)
if weapon id == 30 then
if action == 1 then --- i dont know what else...
addhook("function","bomb")
function explosion(id)
function bomb(id,action)
if weapon id == 30 then
if action == 1 then --- i dont know what else...
answer plz..

Code:
1
2
3
4
5
6
2
3
4
5
6
addhook([[hit]],[[hitteer]])
function hitteer(id,src,wpn,hpd,apd)
if wpn == 30 then
parse([[explosion ]]..player(id,"x")..[[ ]]..palyer(id,"y")..[[ 1 1000 ]]..src)
end
end
function hitteer(id,src,wpn,hpd,apd)
if wpn == 30 then
parse([[explosion ]]..player(id,"x")..[[ ]]..palyer(id,"y")..[[ 1 1000 ]]..src)
end
end