Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 26 7 8338 339 Next To the start

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
or simply write:
1
msg("©255255255"..player (p,"name").." has been given a warning for foul language!")

old Re: Lua Scripts/Questions/Help

wups
User Off Offline

Quote
LinuxGuy has written
spartan029 has written
Well wait a sec! DC added the "only appere when triggerd" to the evn_item already!! So why would LinuxGuy and wups need this script?


Can you make this possible with no lua:
You loose money when you press a trigger (and get item at the same time). I don't think so, but if you do, please say

EDIT: This doesn't work. I recoded original for AMX

1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("use","elevator.press")
 function elevator.press(id, event, data, x, y)

	xtrig = 86 -- The X-position of the trigger
	ytrig = 75 -- The Y-position of the trigger
  
	if (x == xtrig) and (y == ytrig) then
		parse("setpos "..id.." "100 100")
		msg2(id, "*ding*")

		end
	end 
 end



'Use' only works when you create a server local, and only works when you trigger it.

Thats why i using "trigger".

http://amx2d.co.cc/viewtopic.php?p=666#p666

Recode that code instead.

old Re: Lua Scripts/Questions/Help

sonnenschein
User Off Offline

Quote
wups has written
Recode that code instead.

I don't know how to script, thank you all, i will try

EDIT: or PM?
edited 2×, last 09.05.09 11:28:33 am

old CON + no build limit + commands

Tiuqu
User Off Offline

Quote
Hi, i completly do not understand anything of this lol
but can someone make me server.lua for construction mode:

>>no build limit where are some limits but its clear to see what type and how much so i can possibly change it easly

>>RPG-like mode for construction mode, where i would have levels and exp needed for next level and each lvl up would give more hp and armor based by character type, with 4 types (speed, normal, vitaly, heavy) and it would save level for USGN players and like F3 would show up ranking TOP15 and top 1 = auto-admin

>>commands for stuff like "!m4a1", "!health", "!armor" or "!money" with a authority level like "=1" for admin, "=2" for player and "=3" for lvl ? player /basic set to 5, but in way i can find it if needed/

>>Teleport command for teleport 2 sqm in front or like and command for my coordinates, only for admin

iv seen it on some server (without some parts) but admin was offline :p
would be nice if someone just make such file and a help.txt for it, becouse i think construction is the best mode in CD2D but its hard to make server becouse you need to make lua if you want cool server
thx in advance √

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
Tiuqu has written
Hi, i completly do not understand anything of this lol
but can someone make me server.lua for construction mode:

>>no build limit where are some limits but its clear to see what type and how much so i can possibly change it easly

>>commands for stuff like "!m4a1", "!health", "!armor" or "!money" with a authority level like "=1" for admin, "=2" for player and "=3" for lvl ? player /basic set to 5, but in way i can find it if needed/

>>Teleport command for teleport 2 sqm in front or like and command for my coordinates, only for admin

iv seen it on some server (without some parts) but admin was offline :p


You can use amx2d: http://download.amx2d.co.cc and http://amx2d.co.cc

1. Use mp_building_limit Name Number in the console
2. AMX have all of those
@guns M4A1 or @guns Player M4A1
@slap Player -health
@armor Player armor
@givemoney Player money
AMX2D have a custom admin-user system and you can define your own privilege levels (the default are admin and superadmin but you can add privileges in between those)
3. in AMX @teleport Player X Y and @teletile Player X-Tile Y-Tile and you can use @gettile and @getpos to get the positions

And of course, just type in ? to see a list of all the commands available.

old Re: Lua Scripts/Questions/Help

Kaka024
User Off Offline

Quote
Hello guys. I have a mega-big-extra mission for u.

Freeze-tag
•When player get killed, they will can't move and lose weapons.
•When his friend (from the same team) touches his frozen friend, he can move, but he spawns on his spawn.
•When all team is frozen, the opposite team win.
-One thing: After changing a map this script CAN'T WORK (i've had a problems on my next map after GunGame by Keiffer's Opa :P)

Hard?

old Re: Lua Scripts/Questions/Help

Kaka024
User Off Offline

Quote
but in the samples there are some lines "after dead". Like no dead dropping etc. This can spawn player back at his position and freeze. Then u can set on 5 seconds timer checking positions. If someone touches a frozen player then might be unfreezed

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
Kaka024 has written
but in the samples there are some lines "after dead". Like no dead dropping etc. This can spawn player back at his position and freeze. Then u can set on 5 seconds timer checking positions. If someone touches a frozen player then might be unfreezed


And there's also a cs2d command for spawning dead players so if a person can die, the server can spontaneously spawn him back.

old Re: Lua Scripts/Questions/Help

sonnenschein
User Off Offline

Quote
leegao has written
And there's also a cs2d command for spawning dead players so if a person can die, the server can spontaneously spawn him back.

What if CT or T shoots again at him?

old Re: Lua Scripts/Questions/Help

Kaka024
User Off Offline

Quote
Yea it will be rly hard ;/
Maybe dc can say something about this idea? I rly want freeze-tag in cs2d cause it would be funny.

old WF || Charicter

spartan029
User Off Offline

Quote
• If any body has been on the server "WF || Charicter" you find there is a very intriging lua script. I was wondering if i could have that script for the person that made it. of if some one will make it for me! That lvl of lua scripting is way beyond me! So i was just wondering could i have it. plzzzzz

old Re: Lua Scripts/Questions/Help

Kaka024
User Off Offline

Quote
Dc. Freeze isn't a problem, but after kill player can spawn back. We want make that they just stay frozen and nobody can kill them.

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
dirty solution would be to use cs2d cmd spawnplayer + cs2d cmd speedmod on death but then the player would also lose his weapons etc.

I would probably have to make the hit hook skipable for that. Should be no big deal...

Edit: will be possible with the next release! Yay!
edited 2×, last 18.05.09 07:21:13 pm

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
LinuxGuy has written
What if CT or T shoots again at him?


What about it? There's a hook for hit, as long as the weapons don't kill these people on impact (for which you'll fall back to the kill even) you can give them the same amount of HP back.

old Re: Lua Scripts/Questions/Help

Kaka024
User Off Offline

Quote
So DC you will relase freeze-tag or just something what will help with making it? And if the 2nd then is someone able to make this mod?

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
erm... yes. read the last posts more carefully and you will realize that it will be possible with the next release.
To the start Previous 1 26 7 8338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview