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 289 90 91338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Blazzingxx has written
By the way, Flacko
I'm going to make wall detect script (for "#" files). Probably with help of Leegao.
I think we can make 100% car script in this version.


Lol, I abandoned that project because I didn't like the idea of "load the whole map into memory".
I think I will better do a spaceship-like script. Like star wars

Editorman has written
LOL. I made one vehicle on a very easy lua. Now all want to make vehicle's on their script's

???

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Editorman has written
LOL. I made one vehicle on a very easy lua. Now all want to make vehicle's on their script's

Hehe, show us script. I'm shure it's like Flacko.
Trough the walls.

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
playa slaya has written
is it possible to make images rotate with player if so how?

Are you beginer?

1
imagepos(img,x,y,[b]player(id,'rot')[/b])

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
@playa slaya
Lolz, I read your flaming post before you edited it

You used player rotation in one off your scripts...
How you don't know that if you used it?

However, I helped, you shouldn't complain.

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
playa slaya has written
thx

WTF
I could swear you wrote something different 5 seconds ago o.o
BTW, it's easier this way:
Quote
- image("path",x,y,mode)     Creates an image (dynamic object) on the map.
                    Mode 0 for floor image, mode 1 for top image and
                    mode 2 for HUD image.
                    Mode 101-132: draw under this player
                    Mode 201-232: draw over this player
                    When drawing at player, x and y are used this way:
                    x<=0: do not rotate with player, x>0: rotate img with player
                    y<=0: only draw if not covered by fog of war, y>0: draw always

So, when you load a sprite you write
1
image("yourpath",1,0,200+PLAYERID)
And you have a sprite over the player

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
See this by Playa Slaya,
how to Make car.

1
2
3
4
5
6
7
function equip_car(id) 
     i=image("gfx/v_ipod.jpg",1,0,200+id)                                    
     imagescale(i,1,1) 
     imageblend(i,1) 
     imagealpha(i,1.0) 
     imagepos(i,30,30,player(id,'rot')) 
end

old Re: Lua Scripts/Questions/Help

GreenDevil
User Off Offline

Quote
glowingplayers...

Hey i found out something 'How to plant' I will make a lua script that i can build a bed,chair and some more thing's it would be required for build your own house "Map ! !

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
playa slaya has written
is this possible to change:
1
some_func(pl[b],[/b]24)
to replace commas with : or somthing other?



No, it's not.
What do you want that for?

old Re: Lua Scripts/Questions/Help

jackisokay2
User Off Offline

Quote
i need help with a GUN game script

basically i copy-pasta the one that comes with cs2d and changed the weapons, how would i add sounds for when i kill someone, when you level, and when you sign in?

thanks

old Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Quote
i am having trouble with this menu it will not open unless i comment out the menu function
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function serveraction(id,action)
	if (action == 1) then
		menu(id,"Main Menu,Buy Menu >>,Inventory >>,Bounty >>,Manage Data >>")
	end
	if (action == 2) then
		menu(id,"Buy Menu Main,Primary Ammo|$00.005,Secondary Ammo|$00.005,Armor >>,Weapons >>,Miscellaneous >>,Air-Strikes >>,Special Items >>,Back <<") 
	end
end

function menu(id,xmenu,select)
	if (xmenu == "Main Menu") then 
		if (select == 1) then menu(id,"Buy Menu Main,Primary Ammo|$00.005,Secondary Ammo|$00.005,Armor >>,Weapons >>,Miscellaneous >>,Air-Strikes >>,Special Items >>,Back <<") end
		if (select == 2) then menu(id,"Inventory Main,Armor >>,Weapons >>,Miscellaneous >>,Air-Strikes >>,Special Items >>,Back <<") end
		if (select == 3) then menu(id,"Bounty Menu,Pay Bounty >>,Back <<") end
		if (select == 4) then menu(id,"Manage Data Menu,Save Game >>,Load Game >>,Auto-Save Settings >>,Back <<") end
	end
end
To the start Previous 1 289 90 91338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview