English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 73 74 75 ... 338 339 Next To the start
30.10.09 12:47:31 pm
Up
SQ
Moderator
Offline Off
@Toa Hero 92,
Better no-reload script:
Code:
1
2
3
4
5
6
addhook("attack","no_reloads")
function no_reloads(p,m)
     if (m == 1) then
          parse('equip '..p..' '..player(p,"weapontype"))
     end
end
30.10.09 05:52:44 pm
Up
mortyr22
User
Offline Off
how to create classes random and only for ct!?
[img does not exist]
30.10.09 06:12:12 pm
Up
Flacko
User
Offline Off
playa slaya has written:
umm okay but do you are any other advanced scripters think it is possible or not


I think it's not, because once you get stuck in a wall you can't move anywhere, so using the move hook wouldn't work. You can still use other hooks like attack, but it's not the same
30.10.09 06:51:13 pm
Up
Toa Hero 92
User
Offline Off
@playa slaya
&
@Blazzingxx

Thanks for your suggestions but

1) I have no advanced knowledge of lua scripting (I took the list of numbers from a script someone-else made me, because I don't understand lua enough... like I have only an inkling of what the i does & I have no clue what number is appropriate after it.)

2) I though having the entire list would make it more portable to different peoples different needs.(You can choose what weapons you want to have no reload by simply taking a number out.)

I included a question in my previous post on page 73, can someone answer it?
Encompassing LUA Tutorial/Manual/Reference Manual Please go to here http://luaforge.net/frs/download.php/3620/luaaio.chm
30.10.09 07:20:57 pm
Up
Flacko
User
Offline Off
Try this:

parse('hudtxt2 '..id..' 1 "'..YOUR_TEXT_GOES_HERE..'" 240 300 1')

I'm a bit busy to test it now
30.10.09 07:52:18 pm
Up
playa slaya
COMMUNITY BANNED
Offline Off
what do you want just a message or to show omly to the person with id of 1?
30.10.09 07:54:50 pm
Up
mortyr22
User
Offline Off
how to create classes only for ct?!
[img does not exist]
30.10.09 08:00:14 pm
Up
playa slaya
COMMUNITY BANNED
Offline Off
Code:
1
2
3
4
5
6
addhook("serveraction","sa")
function sa(id,action)
        if (action== 1) and (player(id,"team")==2) then
                 <your script for a class menu>
         end
end
30.10.09 08:00:41 pm
Up
Toa Hero 92
User
Offline Off
it doesn't work..
it keeps saying that it is expecting parenthesis by the message part


I want to display my rcon to my admins who forget...


it has to be constantly on display only to the adminsd
Encompassing LUA Tutorial/Manual/Reference Manual Please go to here http://luaforge.net/frs/download.php/3620/luaaio.chm
30.10.09 08:04:51 pm
Up
mortyr22
User
Offline Off
sorry but this dont work all players has 1 class armor and weapons...(soldier)+ct and t cant chose class
[img does not exist]
30.10.09 08:52:05 pm
Up
Starkkz
Moderator
Offline Off
Hello, now i was making the mod Battle Field 2D
and i need help with class

Spoiler >


the problem of the mod in the class is how to put the menu at spawn the player, how i can make this?.
please help me

On the battle field now i maked the

-Weapon Dmg of Claw, (Gives Health to players with an hit)
-No Buy (Only can use weapons of the class)
-No Collecting (to no collect more weapons only the weapon gived)
-No Reload (If you attack the weapon not need reload)
-Usgn Funcs
-No Drop (To not drop the weapon or item gived for class)

Giveme an Idea for the Battle Field mod (BF2D)
lol
30.10.09 08:53:57 pm
Up
mortyr22
User
Offline Off
you can edit original classes in lua\samples\classes.lua
[img does not exist]
30.10.09 09:03:45 pm
Up
Starkkz
Moderator
Offline Off
yes i can edit but...
i need put at spawn this is my problem.
i change the modes
this is an example, i need help to put it at spawn.
lol
30.10.09 09:42:21 pm
Up
Flacko
User
Offline Off
Hey slaya, check this out

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--[[Transforms CS2D's bizarre rotation angle into the standard radian-based system that everyone loves <3]]
function standardrad(angle)
     if (angle<-90) then
          angle = (angle + 360)
     end
     return math.rad(math.abs( angle + 90 ))-math.pi
end

addhook("attack","walkwalls")
function walkwalls(id)
     local rot = player(id,"rot")
     local angle = standardrad(rot)
     local x = player(id,"x") + math.cos(angle)*60
     local y = player(id,"y") + math.sin(angle)*60
     parse("setpos "..id.." "..x.." "..y)
end


It took me a while to find my C++ code and some minutes making the function, then I ported it to Lua
You can change the 60 value to anything you want, higher value, further will the distance be.
If you use a M249 you look like a train
31.10.09 01:11:14 am
Up
NozliW
User
Offline Off
how can i do multiple menus ?
like this
Spoiler >

i'd really apreciate an example
(if possible with weapon costs)
31.10.09 01:18:22 am
Up
playa slaya
COMMUNITY BANNED
Offline Off
functions have a few of them containing different menu names and stuff i did this in my new rpg for every menu you check in that if you have if you do not have then download
31.10.09 01:50:19 am
Up
Argh
User
Offline Off
How I make mods?
31.10.09 02:11:56 am
Up
playa slaya
COMMUNITY BANNED
Offline Off
well anything you do that changes a game in any way is technectlly a mod
31.10.09 02:51:09 am
Up
Flacko
User
Offline Off
playa slaya has written:
well anything you do that changes a game in any way is technectlly a mod


Did u see the script I posted for you?
31.10.09 02:51:59 am
Up
playa slaya
COMMUNITY BANNED
Offline Off
what are you talking about?
To the start Previous 1 2 ... 73 74 75 ... 338 339 Next To the start