AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   im a super noob with scripting !!!Help Plz!!! (https://forums.alliedmods.net/showthread.php?t=17895)

brahderneke 09-11-2005 07:35

im a super noob with scripting !!!Help Plz!!!
 
i have my own server but idk wtf is scripting or how to install plugins...
but lets help me with the scripting first....

1. Please tell me what scripting is and what does it do??

2. Do i need a scripting program inorder to make plugins??

3. If so where can i get it??

3. Does scripting only make plugins??

4. How do i use scripting??

HELP HELP HELP :cry: :cry: :cry: :cry: :cry:

pdoubleopdawg 09-11-2005 07:40

Scripting(Or programming..):
How do you think Half-Life was made? They programmed it in C++.

How do you think plugins are made? The AmxModX devs used C++/etc to make a nice plugin system.
Plugins are scripted in Pawn (Small 3.0)

To make them, you need notepad. To make them usable, you need the compiler located in
amxmodx/scripts.

You should read the documentation.

Here's an example script for model restrictions made by yours truly:
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <engine> new num,i,players[32],line,text[64],txtlen,model[41],configsdir[51],dir[61] public plugin_init() {     register_plugin("model restriction","0.1","DahVid")     register_clcmd("amx_addresmodel","write_new_model",ADMIN_BAN,"amx_addresmodel <models/bla.mdl>")     register_forward(FM_SetModel,"modelchange",0) } public modelchange(id) {     get_players(players,num)     get_configsdir(configsdir,50)     format(dir,60,"%s/restrictedmodels.ini",configsdir)         if(!file_exists(dir)) {         new begintext[51]         format(begintext,50,"// First time user! File made! --DahVid")         write_file(dir,begintext,-1)     }         for(i = 0; i <= num; i++) {         entity_get_string(i,EV_SZ_model,model,40)         while((line = read_file(dir,line,text,63,txtlen)) != 0) {             if(equali(text,model)) {                 client_cmd(i,"disconnect")                 console_print(i,"Sorry, this model is restricted!")                 }         }     } } public write_new_model() {     new modelname[61]     read_argv(1,modelname,60)     get_players(players,num)     get_configsdir(configsdir,50)     format(dir,60,"%s/restrictedmodels.ini",configsdir)     write_file(dir,modelname,-1) }

I forgot to mention there is a tool that makes making/editting plugins much easier.

Syntax highlighting
Auto-indenting
Intellisense

EtC..

http://prdownloads.sourceforge.net/a...2.zip?download

brahderneke 09-11-2005 08:03

Thanx
 
Thanx!!!


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

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