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 2196 197 198338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Pikachu xD has written
KINGGOLDrus has written
How to open the website on LUA?

Let me guess: Not possible?

It's possible, I managed to mess around with the WinInet library until I got it to download the main page of this website

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
Pikachu xD has written
KINGGOLDrus has written
How to open the website on LUA?

Let me guess: Not possible?


Nothing's impossible :P, as Flacko stated before, it's possible to interact with the OS via Lua's C API:

IMG:https://i560.photobucket.com/albums/ss44/leegao/de_dust_00000.jpg


And Flacko wrote a wonderful tutorial on how to integrate third part libraries with CS2D's Lua runtime.

http://cs2d.org/questions/7/[Tut]-How-to-write-a-binary-module

The real magic happens after step 6.

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
Who can make script. Admin give works

Works Menu

Worker - 1000$/Minute
Miner - 2000$/Minute
Barman - 3000$/Minute
Soldier - 4000$/Minute
Doctor - 5000$/Minute
Dealer - 6000/Minute
Banker - 7000$/Minute

If admin say : give_work ID Worker
Miner,Barman,Solider,DOctor,Dealer,Banker etc.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("minute","RPminute")
function RPminute()
local p = function(id)
if player(id,"exists") then return true end
return nil
end
local give = function(id,ammount)
                    msg2(id,"©150100255 Pay Day!@C")
                                        msg2(id,"©150100255 Wyplata!@C")
addmoney(id, 5000)
end
for id=1,32 do
if p(id) then
give(id,5000)
end
end
end
i use this script you must remake it ;s

old Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Quote
@Soja1997
I make it for you
You need to say !givework <ID> <WORKNUMBER>

Work Numbers :
0 - No Work
1 - Worker
2 - Miner
3 - Barman
4 - Soldier
5 - Doctor
6 - Dealer
7 - Banker

PS : Remember to edit your USGN or NAME at line 74
1
if (player(id,"usgn")==01234 then--IMPORTANT : INPUT YOUR USGN HERE!!!!OR YOU NAME WITH if (player(id,"name")=="YOURNAMEHERE" then

Spoiler >

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
Hey Gabpro i have one problem
http://img202.imageshack.us/i/errorli.png/
Spoiler >

old Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Quote
DRoNe has written
what is bad ?
1
if tile(x,y,"wall") or tile(x,y,"obstacle") or tile(x,y,"deadly") then ...


Maybe x and y are pixels, and they have to be tiles.

old Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Quote
maybe


----------------------------------------------------------------
i don't want spawn item at wall,obstacle,deadly tile = he can be spawned at wall,obstacle,deadly...
omg i dont know it !

Can somebody help? thanks

old Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Quote
@Soja1997
Thats easy!
1
2
if (player(id,"usgn")==16001 then
if (player(id,"name")=="pD# Soja_PL" then

Erase the firsts "("
1
2
if player(id,"usgn")==16001 then
if player(id,"name")=="pD# Soja_PL" then

PS:You dont need to do the 2 "if"s,only one is good

old Re: Lua Scripts/Questions/Help

Mirash
User Off Offline

Quote
Can you help me I want to make a script to obtain the experience and the preservation and classes. the more experience the better you klass.Ya do not know much English and I use a translator.

old Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Quote
DRoNe has written
maybe


----------------------------------------------------------------
i don't want spawn item at wall,obstacle,deadly tile = he can be spawned at wall,obstacle,deadly...
omg i dont know it !

Can somebody help? thanks


Omg i answered you X and Y have to be the coordinates of a tile. How do u obtain those values?

old Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Quote
Lee has written
Pikachu xD has written
KINGGOLDrus has written
How to open the website on LUA?

Let me guess: Not possible?


Nothing's impossible :P, as Flacko stated before, it's possible to interact with the OS via Lua's C API:

IMG:https://i560.photobucket.com/albums/ss44/leegao/de_dust_00000.jpg


And Flacko wrote a wonderful tutorial on how to integrate third part libraries with CS2D's Lua runtime.

http://cs2d.org/questions/7/[Tut]-How-to-write-a-binary-module

The real magic happens after step 6.


It kinda is impossible tho.
You can't FORCE people to open a webbrowser on their own computer.
You can however try to make your own webbrowser inside cs2d to show them the html code, but this will be very hard.

old Help!

craza424
User Off Offline

Quote
Is there anyway someone can make me a script for admin colour when they speak, I need to for a dedicated server AND for more then 1 person, as many as needed.
Thanks!

old Re: Lua Scripts/Questions/Help

Crazyx
User Off Offline

Quote
I had the idea to create a Lua USP map, that all players started with silenced USP or when they grab the USP it comes already silenced.
Is it possible?

I don't care if it allows the player to turn back to normal or it has to be always silenced.

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
Gabpro Hey, you can do so that when you press the F3 menu included
1st Quit Job
2nd Jobs Offer
3th Go to Job
When you press the 2 displays the inscription No. jobs offer
When you type admin! joboffer 1
and press 2 again displays the inscription Jobs offer: Worker
When you press a leave from work if you have it
To the start Previous 1 2196 197 198338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview