Search
Latest topics
Similar topics
Most active topic starters
ZxC | ||||
>L.E.E< | ||||
NinjaAssasinX | ||||
Anonymous :D | ||||
halt drop or die | ||||
Street Workout | ||||
CrazyRussian | ||||
Flame Boy | ||||
COB®a | ||||
VeyroN <3 |
How to make Lua scripting?
3 posters
Page 1 of 1
How to make Lua scripting?
!!!READ THE THREAD FIRST!!!
Hi all!
In this thread i will show the learning "how to script using Lua".
In general i am not a scripter nor i am good at scripting but i can show some tutorials borrowed.
Now let's start.
--------------------------------------------------------------
Lua
Everyone knows what is lua right?
Lua-Lua is a program language that is written in C.
In general this word "Lua" is in portughese language and that mean "moon".
Also the logo can speak itself is a moon.
----------------------------------------------------------------
2-Definitions of parameter
Here i will put some definitions of some parameters.
Variables-This parameter is the most important thing in the lua programming.
Here i will put an example of a variable:
Now you understand the function of the variable right?
Also there are many functions and hooks but you can see more in the link --->Lua scripting
Just scroll down and you will see the hooks and the functions.
----------------------------------------------------------------
3-Tools for scripting
Here i will put some two tools that are useful for lua scripting.
Notepad++
SciTE
---------------------------------------------------------------
3-Some tutorials
Here i will put some tutorials that may be useful for you.
Lua scripting
Learning the lua in hard way #1
Learning the lua in hard way #2
Lua 5.1 Reference Manual
---------------------------------------------------------------
4-Samples of CS2D, hooks and lua commands
CS2D Hooks
CS2D Lua commands
Samples- The samples can be useful, so to find the samples of CS2D, you must go to CS2D directory/sys/lua/samples and here you can find some samples.
-----------------------------------------------------------------
And that it.
To learn and understand the lua scripting, you must practicing more and requie more logic for that.
It will be very hard at the start, but it will be easy when you understand.
Cheers and regards,
ZxC
Hi all!
In this thread i will show the learning "how to script using Lua".
In general i am not a scripter nor i am good at scripting but i can show some tutorials borrowed.
Now let's start.
--------------------------------------------------------------
Lua
Everyone knows what is lua right?
Lua-Lua is a program language that is written in C.
In general this word "Lua" is in portughese language and that mean "moon".
Also the logo can speak itself is a moon.
----------------------------------------------------------------
2-Definitions of parameter
Here i will put some definitions of some parameters.
Variables-This parameter is the most important thing in the lua programming.
Here i will put an example of a variable:
- Code:
My box=The content of the box
Now you understand the function of the variable right?
Also there are many functions and hooks but you can see more in the link --->Lua scripting
Just scroll down and you will see the hooks and the functions.
----------------------------------------------------------------
3-Tools for scripting
Here i will put some two tools that are useful for lua scripting.
Notepad++
SciTE
---------------------------------------------------------------
3-Some tutorials
Here i will put some tutorials that may be useful for you.
Lua scripting
Learning the lua in hard way #1
Learning the lua in hard way #2
Lua 5.1 Reference Manual
---------------------------------------------------------------
4-Samples of CS2D, hooks and lua commands
CS2D Hooks
CS2D Lua commands
Samples- The samples can be useful, so to find the samples of CS2D, you must go to CS2D directory/sys/lua/samples and here you can find some samples.
-----------------------------------------------------------------
And that it.
To learn and understand the lua scripting, you must practicing more and requie more logic for that.
It will be very hard at the start, but it will be easy when you understand.
Cheers and regards,
ZxC
ZxC- Owner
- Posts : 655
Thanks : 0
Join date : 2014-08-20
Location : Italy
Re: How to make Lua scripting?
FOR NEWBIE players this make their mind more complex by reading tutorial
i will suggest to all beginners to learn lua by seeing other script like me.
i learnt lua by seeing other scripts. its the best way.
after getting an idea about lua then see tutorials cuz it will make u understand.
IF a beginner is seeing a lua tutorial his mind will just say : "OHH WHATS thissss".
and also this scripting tool helps u a lot at scripting.
this is made by the iran town coder.
i will suggest to all beginners to learn lua by seeing other script like me.
i learnt lua by seeing other scripts. its the best way.
after getting an idea about lua then see tutorials cuz it will make u understand.
IF a beginner is seeing a lua tutorial his mind will just say : "OHH WHATS thissss".
and also this scripting tool helps u a lot at scripting.
this is made by the iran town coder.
- Attachments
Guest- Guest
Re: How to make Lua scripting?
Ajmin wrote:FOR NEWBIE players this make their mind more complex by reading tutorial
i will suggest to all beginners to learn lua by seeing other script like me.
i learnt lua by seeing other scripts. its the best way.
after getting an idea about lua then see tutorials cuz it will make u understand.
IF a beginner is seeing a lua tutorial his mind will just say : "OHH WHATS thissss".
and also this scripting tool helps u a lot at scripting.
this is made by the iran town coder.
Nice tool.
However learning lua scripting is more better.
I don't mean this tool is not useful, but learning the coding in lua it will be more better.
But thanks for that tool, is useful.
ZxC- Owner
- Posts : 655
Thanks : 0
Join date : 2014-08-20
Location : Italy
Re: How to make Lua scripting?
dice wrote:you have iran town lua?
I saw in Unreal Software File Archive section, the iran town editor is deleted and there will not be iran town editor anymore.
But i see Ajmin still keep this file in his computer.
ZxC- Owner
- Posts : 655
Thanks : 0
Join date : 2014-08-20
Location : Italy
Re: How to make Lua scripting?
In CS2D you need to combination lua with hook from CS2D, Example with join hook:
also, you can get more hook at www.cs2d.com
- Code:
addhook("join","joinxpl") --- hook join
function joinxpl(id) --- function of hook join
-- msg2(id,"Welcome "..player(id,"name"))
end --- this is for "function joinxpl(id)"
also, you can get more hook at www.cs2d.com
J+- Scripter
- Posts : 44
Thanks : 0
Join date : 2013-09-12
Age : 25
Location : Joni village in SAZ clan
Re: How to make Lua scripting?
also u need to make ends for if and for.
mainly for functions
mainly for functions
Guest- Guest
Re: How to make Lua scripting?
Ajmin wrote:also u need to make ends for if and for.
mainly for functions
I know that parameter.
The "end" is used for ending the lua (i don't mean it will not work the functionality of lua).
Also the "parse" parameter i know is a parameter that put a action by the game i think. :/
For example:
- Code:
parse "/kill"
ZxC- Owner
- Posts : 655
Thanks : 0
Join date : 2014-08-20
Location : Italy
Re: How to make Lua scripting?
nono
parse used for rcon commands notconsole commands and u dont want to use /kill just use kill.
but kill is a console cmd not rcon cmd.
so u can use killplayer instead of kill.
rcon cmd's can be only executed by users who know rcon.
console cmds is common like anyone can use it in gameplay.
correct one:
parse("killplayer 1")
wrong one:
parse("/killplayer 1")
parse used for rcon commands notconsole commands and u dont want to use /kill just use kill.
but kill is a console cmd not rcon cmd.
so u can use killplayer instead of kill.
rcon cmd's can be only executed by users who know rcon.
console cmds is common like anyone can use it in gameplay.
correct one:
parse("killplayer 1")
wrong one:
parse("/killplayer 1")
Guest- Guest
Re: How to make Lua scripting?
Ajmin wrote:nono
parse used for rcon commands notconsole commands and u dont want to use /kill just use kill.
but kill is a console cmd not rcon cmd.
so u can use killplayer instead of kill.
rcon cmd's can be only executed by users who know rcon.
console cmds is common like anyone can use it in gameplay.
correct one:
parse("killplayer 1")
wrong one:
parse("/killplayer 1")
Yes sir, i understood.
You are good at lua than me. -.-
You deserve a big ice cream.
Because i'm sure in Saudi Arabia is so hot.
ZxC- Owner
- Posts : 655
Thanks : 0
Join date : 2014-08-20
Location : Italy
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
10/7/2015, 9:22 pm by Bus School
» The main forum has been moved
21/6/2015, 10:38 pm by Anonymous :D
» Application to be mod on saz server
28/3/2015, 7:33 pm by Anonymous :D
» Aplication mod
6/2/2015, 8:12 am by Ajmin
» Refurbishing the forum
4/2/2015, 6:44 pm by ZxC
» Ban appeals request
4/2/2015, 6:32 pm by ZxC
» Suggesting ideas
4/2/2015, 6:23 pm by ZxC
» Rule violation and banning
4/2/2015, 6:01 pm by ZxC
» Server Rules
4/2/2015, 5:57 pm by ZxC