English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 196 197 198 ... 338 339 Next To the start
01.05.10 09:42:48 am
Up
Cure Pikachu
User
Offline Off
KINGGOLDrus has written:
How to open the website on LUA?

Let me guess: Not possible?
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
01.05.10 02:45:02 pm
Up
Flacko
User
Offline Off
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
01.05.10 05:53:56 pm
Up
Lee
Moderator
Offline Off
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:http://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.
01.05.10 06:13:01 pm
Up
Heartless Soldier
User
Offline Off
Spoiler >


What does it do?
01.05.10 06:38:03 pm
Up
Soja1997
User
Offline Off
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.
Code:
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
01.05.10 07:41:55 pm
Up
gabpro
User
Offline Off
@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
Code:
1
if (player(id,"usgn")==01234 then--IMPORTANT : INPUT YOUR USGN HERE!!!!OR YOU NAME WITH if (player(id,"name")=="YOURNAMEHERE" then


Spoiler >
01.05.10 09:56:19 pm
Up
Soja1997
User
Offline Off
Hey Gabpro i have one problem
http://img202.imageshack.us/i/errorli.png/
Spoiler >

01.05.10 10:19:36 pm
Up
DRoNe
User
Offline Off
what is bad ?
Code:
1
if tile(x,y,"wall") or tile(x,y,"obstacle") or tile(x,y,"deadly") then ...
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
01.05.10 10:23:29 pm
Up
Heartless Soldier
User
Offline Off
DRoNe has written:
what is bad ?
Code:
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.
01.05.10 10:24:28 pm
Up
Soja1997
User
Offline Off
Hey nbK Help me
01.05.10 10:45:57 pm
Up
DRoNe
User
Offline Off
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
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
02.05.10 12:11:40 am
Up
gabpro
User
Offline Off
@Soja1997
Thats easy!
Code:
1
2
if (player(id,"usgn")==16001 then
if (player(id,"name")=="pD# Soja_PL" then


Erase the firsts "("
Code:
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
02.05.10 04:33:04 am
Up
Mirash
User
Offline Off
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.
IMG:http://i.imgur.com/lTZcb.jpg
IMG:http://i.imgur.com/OW055.png
02.05.10 05:01:21 am
Up
Heartless Soldier
User
Offline Off
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?
02.05.10 03:08:53 pm
Up
YellowBanana
BANNED
Offline Off
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:http://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.
02.05.10 06:42:47 pm
Up
craza424
User
Offline Off
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!
IMG:http://img6.imageshack.us/img6/3535/yodadancey.gif
02.05.10 06:54:03 pm
Up
Crazyx
User
Offline Off
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.
02.05.10 07:47:55 pm
Up
DRoNe
User
Offline Off
i think yea.
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
02.05.10 07:56:53 pm
Up
Crazyx
User
Offline Off
Please give me the full code. Anyone?
02.05.10 09:43:41 pm
Up
Soja1997
User
Offline Off
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 2 ... 196 197 198 ... 338 339 Next To the start