Raised This Month: $ Target: $400
 0% 

im a super noob with scripting !!!Help Plz!!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-11-2005 , 07:40  
Reply With Quote #2

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
pdoubleopdawg is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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