English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 337 338 339 Next To the start
26.12.10 09:40:54 pm
Up
MasterAsp
User
Offline Off
@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.
26.12.10 11:09:28 pm
Up
Vetle
BANNED
Offline Off
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.
27.12.10 01:01:48 am
Up
shironeko
User
Offline Off
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
27.12.10 03:01:46 am
Up
J4x
User
Offline Off
How i make an explosion when i hit another player?

something like
Code:
1
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...
edited 3×, last 27.12.10 10:02:15 pm
27.12.10 04:42:32 am
Up
ULtiMa
User
Offline Off
I have a question at lua

1. How to add level that saves when logged in usgn?
27.12.10 07:57:30 am
Up
Crash13
User
Offline Off
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
Up
Baofu92
User
Offline Off
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?
edited 2×, last 28.12.10 11:02:14 am
27.12.10 02:43:58 pm
Up
maPmaKer
User
Offline Off
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?
27.12.10 02:49:15 pm
Up
DannyDeth
User
Offline Off
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 03:27:45 pm
Up
maPmaKer
User
Offline Off
hope it will work. Thanks!
27.12.10 07:50:25 pm
Up
sixpack
User
Offline Off
-F1r3Z has written:
I have a question at lua

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...
27.12.10 09:08:56 pm
Up
3RROR
User
Offline Off
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
IMG:http://gamerswins.com/images/ins/logo.png
27.12.10 09:27:21 pm
Up
Yasday
User
Offline Off
Code:
1
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

idk if it works, did it from scratch.
for "sfx/thesound.ogg" insert the path of your sound file
27.12.10 09:41:14 pm
Up
weed_muffin
User
Offline Off
CoolioG has written:
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?


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.
27.12.10 10:04:00 pm
Up
J4x
User
Offline Off
Quote:
How i make an explosion when i hit a player?

something like
Code:
1
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...


answer plz..
27.12.10 10:10:41 pm
Up
Yasday
User
Offline Off
Code:
1
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
27.12.10 10:16:50 pm
Up
J4x
User
Offline Off
thx for the solution but i have a question..

1. why u add []
27.12.10 11:05:39 pm
Up
Yasday
User
Offline Off
Because I'm used to it I like it more.
And in Notepad++ the strings with [[]] are red xD.
27.12.10 11:06:44 pm
Up
J4x
User
Offline Off
ok.. the script dont work...
27.12.10 11:11:59 pm
Up
Yasday
User
Offline Off
any error message in the console ?
To the start Previous 1 2 ... 337 338 339 Next To the start