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 2196 197 198338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
Pikachu xD hat geschrieben
KINGGOLDrus hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Zitieren
Pikachu xD hat geschrieben
KINGGOLDrus hat geschrieben
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.

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Zitieren
DRoNe hat geschrieben
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.

alt Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Mirash
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Zitieren
DRoNe hat geschrieben
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?

alt Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Zitieren
Lee hat geschrieben
Pikachu xD hat geschrieben
KINGGOLDrus hat geschrieben
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.

alt Help!

craza424
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Crazyx
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 2196 197 198338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht