AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Someone teach me SMALL (https://forums.alliedmods.net/showthread.php?t=1757)

Girthesniper 05-07-2004 18:55

Someone teach me SMALL
 
Could someone like jghg, or asskicker, teach me SMALL please! I really want to learn. But its really hard to understand the tutorials. Please post.

Peli 05-07-2004 19:36

Guess what. Nobody is going to teach you this is something where you teach yourself , go sit and read the tutorial Bail is making then search tutorial on this forum and you will find a couple , read those then go read peoples plugins in the plugins page then guess what? More READING YAY!!! :) Go read the natives in the folder : /amxx/scripting/includes and those are the functions / commands you will use in your plugins , get ideas from others post here with your question and guess what else? Read the PEOPLES PLUGINS !!! :)

QwertyAccess 05-07-2004 19:36

noone's going to teach you small and if there was someone they themselves might not even know it well, SMALL is something you learn yourself its a simple language, really. http://www.nsarmslab.com/qwerty/smileys/cool.gif

Girthesniper 05-07-2004 20:20

its not for me.

QwertyAccess 05-07-2004 21:49

then dont even bother asking. http://www.nsarmslab.com/qwerty/smileys/eyebag.gif

Peli 05-07-2004 22:39

I don't want to be mean but... "If you want things done , do them yourself!". Tell that to your buddy.

Girthesniper 05-08-2004 00:22

you are being mean. You just don't want the comunity of AMXx to spread, i see how it is.

Freecode 05-08-2004 01:55

$$$

Fean0r 05-08-2004 15:10

Quote:

Originally Posted by Girthesniper
you are being mean. You just don't want the comunity of AMXx to spread, i see how it is.

Thats not the case however perhaps your just to lazy to put some sort of effort in yourself and expect other to do it for you. I'm a complete small newbie but have found providing you at least try to do it yourself and post your progress/problems/error then people are more than happy to help you.

Gor.d 05-08-2004 20:50

Do everything that Peli suggested. That is the best and fastest way to learn. It seems to me that learning this stuff is sort of like dominoes. The more you learn the faster you learn. Post specific questions in here or in the IRC channel and there is always someone willing to take the time to help you understand.

QwertyAccess 05-08-2004 21:47

Quote:

Originally Posted by Girthesniper
you are being mean. You just don't want the comunity of AMXx to spread, i see how it is.

People don't have the time to be teaching others how to do things, and some do not wish to teach. If you want to learn small you must teach yourself small, noone is gonna waste their personal time teaching another instead of making another plugin.

Girthesniper 05-09-2004 15:49

How the frig can i teach something to my self that i dont even know!

kingpin 05-09-2004 15:52

hahahahahahhahahahaa, lol man thats funny, look go around read other ppl plugins and usage of small in them read the tutorials like theabove posts said and thats how u teach urself.

Girthesniper 05-09-2004 15:58

where are the tutorials? I've trid reading the plugins, they just dont seem to make sense.

Ingram 05-09-2004 16:03

Girthesniper, i never read the tutorials (probably should get around to it), and i can do basic stuff. Start looking at some small plugins (make sure u know what the plugin does), when u get to a command u don't understand, look in the includes. You don't need tutorials, u just need a brain that works.

edit: posted when ^ did.

kingpin 05-09-2004 16:04

o yeah that reminds me reading the *.inc files in the amxx/scripting/include folder is a great way of learning.

Girthesniper 05-09-2004 16:20

Quote:

Originally Posted by JJkiller
Girthesniper, i never read the tutorials (probably should get around to it), and i can do basic stuff. Start looking at some small plugins (make sure u know what the plugin does), when u get to a command u don't understand, look in the includes. You don't need tutorials, u just need a brain that works.

edit: posted when ^ did.

could you post some example plugins? I tried to read the Admin Weapon II plugin, but i got lost after like the 39th line.

Girthesniper 05-09-2004 16:21

Quote:

Originally Posted by kingpin
o yeah that reminds me reading the *.inc files in the amxx/scripting/include folder is a great way of learning.

huh, I should try that.

QwertyAccess 05-09-2004 16:22

try to read it carefully, and around it admin weapon is a really simple plugin

Girthesniper 05-09-2004 16:24

ok, after like freakin 10 seconds of trying to read amxmodx.inc, I started to freak out, not understanding ANY THING. SMALL is nothing like HTML. See i have a learning disability, i'm that guy in class thats always asking questions about every thing. I cannot learn any thing unless its like broken down into its simplest fourm "eg HTML.".... Infact i still dont know most of HTML, all i know is
Code:

<HTML. <HEAD> <body> <center> [b]

 <italic> <font = w./e> etc etc


kingpin 05-09-2004 16:31

well here's my question, do u have a grand idea ur trying to translate into a plugin? if not and u are supposedly the guy who rides the short bus to school then why waste your time? either apply urslef or dont... its upto u

Girthesniper 05-09-2004 16:39

at least I can spell things right. I am trying damnit, its not easy. It might be for you, but its not for me.

kingpin 05-09-2004 16:45

yeah your right about the spelling u spell pretty good when ur whining for attention, heres something for u to read either way : http://www.compuphase.com/small.htm

Ingram 05-09-2004 16:50

ok a simple plugin AMX_FF by JustinHoMi might be a good exmaple (If u don't want me to use your plugin as an example, say so and i'll remove it)

First thing u want to know what the plugin does, so run it, next look at the init
Code:

public plugin_init(){
        register_plugin("Admin FF","0.21","JustinHoMi")
        register_concmd("amx_ff","admin_ff",ADMIN_CVAR,"< 0/1 >")
        register_clcmd("say /ff","check_ff")
        return PLUGIN_CONTINUE
}

register_plugin("Admin FF","0.21","JustinHoMi") is the author's info to put in, register_concmd is a command that the server or a client can run (this is important), register_clcmd is a command that only clients can run (also important). return PLUGIN_CONTINUE means u dont want the plugin to end. PLUGIN_HANDLED means u want it to stop.(You don't need to put a return in the init, so my recommendation is dont)

I'll start easier, the client command(commands are what u would type in console, but pressing a key u also run the command in your console) say /ff, runs check_ff
Code:

public check_ff(id) {
        new ff = get_cvar_num("mp_friendlyfire")
        if(ff == 1)
                client_print(id,print_chat,"[AMXX] Friendly fire is on")
        else if(ff == 0)
                client_print(id,print_chat,"[AMXX] Friendly fire is off")
        return PLUGIN_HANDLED
}

first thing this does is it gets the value of mp_friendlyfire and puts it in the value ff, if ff is 1, friendly fire is on and it tells the client that, if not it tells the client its not on

now the harder one, amx_ff, when u type it in console it runs admin_ff
Code:

public admin_ff(id,level,cid){
        if (!cmd_access(id,level,cid,2))  // I changed this part
                      return PLUGIN_HANDLED

        new ff_s[2]
        read_argv(1,ff_s,2)
        new ff = str_to_num(ff_s)

        if(ff == 1) {
                server_cmd("mp_friendlyfire 1")
                console_print(id,"[AMXX] Friendly fire is now on")
        }
        else if(ff == 0) {
                server_cmd("mp_friendlyfire 0")
                console_print(id,"[AMXX] Friendly fire is now off")
        }

        return PLUGIN_HANDLED
}

if (!cmd_access(id,level,cid,2)) is used to check if they have access and the correct # of arguments has been entered, if not it kicks them outta the plugin (if they have access, but an incorrect # of arguments. it'll give them the help for the command, but that isn't in this plugin (anymore)) new ff_s[2] is creating a array for input, each character that the admin enter, if they entered 12, takes a place in the array, so that would take 2 spaces. read_argv(1,ff_s,2) is reading in the 1st (notice the 1) argument after the command that the admin has entered, ff_s is where it is being read into, and 2 is the maximum length it can be. new ff = str_to_num(ff_s) changes the array u just read in into a #. The rest u should need help with by now.


Now that i have told u the basics of a plugin, u should be able to understand many of them, any natives (commands sorta) in the plugins u don't understand, look in the includes first, then ask questions on them. Sorry if this didn't help, but i can only try.
Edit: Wow i really coulda wrote a new plugin in that time!

Peli 05-09-2004 16:56

Sorry but I'm going to have to throw some links at you , this isn't hard to learn but it isn't something where you sit for three seconds and learn. :

Bail's Scripting Tutorial ( Beta )
Scarzzurs Scripting Tutorial
Small Scripting Tutorial
Google Scripting Tutorial

smartsl 05-12-2004 23:15

http://www.compuphase.com/small.htm
here i find 404 error.

could some one plz tell me where can i get these files:
"The Small toolkit for Microsoft Windows" smallkit.exe
"The Small booklet 1. The Language" smalldoc.pdf
"The Small booklet 2. Implementor's Guide" smallguide.pdf

i can only found some of the files by google, but very old version. i need the latest ver. is there any one can help me?

kingpin 05-13-2004 07:33

the link works fine.

smartsl 05-13-2004 11:25

Quote:

Originally Posted by kingpin
the link works fine.

:lol: Just as u say, it's ok now. :lol:


All times are GMT -4. The time now is 14:58.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.