Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 273 74 75338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
@Toa Hero 92,
Better no-reload script:
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

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
playa slaya hat geschrieben
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

alt Not knowing how

Toa Hero 92
User Off Offline

Zitieren
@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?

alt Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Toa Hero 92
User Off Offline

Zitieren
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

alt Help with bf2d

Starkkz
Moderator Off Offline

Zitieren
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)

alt mortyr22

Starkkz
Moderator Off Offline

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

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
Hey slaya, check this out

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

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
how can i do multiple menus ?
like this
Spoiler >

i'd really apreciate an example
(if possible with weapon costs)

alt Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
playa slaya hat geschrieben
well anything you do that changes a game in any way is technectlly a mod


Did u see the script I posted for you?
Zum Anfang Vorherige 1 273 74 75338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht