AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Admin Paint v1.5 (https://forums.alliedmods.net/showthread.php?t=11783)

genesis 03-28-2005 13:07

Admin Paint v1.5
 
1 Attachment(s)
Here's a picture to set the mood:

http://rad.clanservers.com/paint.jpg

to use this feature ^^:
bind <key> paint

http://rad.clanservers.com/paint2.jpg

to use this feature ^^:
bind <key> paint2 x 255 x

Amx_paint

Usage:

bind <key> paint - this will draw one point where you are pointing and make it have a random color.

bind <key> paint <red> <green> <blue> x - When you supply parameters to paint function, it interprets 0 as unsupplied and therefore Random, if you supply x or X it will assume you want 0. Supply the parameters as <red> <green> <blue> here are some Examples:

bind <key> paint x 255 x - bright green unchanging dots
bind <key> paint 0 x x - different shades of red dots
bind <key> paint 0 255 x -different shades of green - yellow dots
bind <key> paint x x 128 - navy blue unchaning dots

bind <key> clearpaint
This will erase dots of any kind, important to use and use often to insure you have enough dots to complete a word/phrase.

bind <key> paint2 <red> <green> <blue> - works very similarly to the paint function; however it connects with lines, a line is the same color as the dot just created to connect it to. The best effect for this is to use solid unchanging colors IMO.

Small warning about paint2 function, the lines it draws cannot be erased so write meaningful stuff, and it will be erased on any map change.

Here are some examples

bind <key> paint2 x 255 x - bright green unchanging dots
bind <key> paint2 255 x x - bright red ' '
bind <key> paint2 x x 255 - bright blue ' '
bind <key> paint2 255 255 x - bright yellow ' '
bind <key> paint2 255 255 255 - bright white ' '

bind <key> stopline
When this command is run it wont connect the next dot you draw to the last, this is extremely useful when creating new letters or words you don't want them to connect.

Warning, this plugin creates entities many of them so I don't recommend using paint more then about 30 times before clearing the paint, which deletes the entities, A safety feature is installed but your safest bet is to never draw more than 30 entities without using the clearpaint function.

Oh, and by default you must have the letter O in your access aka ADMIN_LEVEL_C, also you must have the engine Module enabled

Twilight Suzuka 03-28-2005 13:09

You should make it so you can paint different colors.

genesis 03-28-2005 13:09

it does paint random colors, wow your a fast poster :)

its kinda like the paintball cheat mode on goldeneye for N64

Twilight Suzuka 03-28-2005 14:01

Fastest spammer in the East ^^

I meant an override, like this:

Code:
/* * *   Amx Paint *         by Genesis * * Be carefull painting, too many * paint dots will crash the server * */ #include <amxmodx> #include <amxmisc> #include <engine> // Storage for limiting. new paint; public plugin_init() {     register_plugin("Paint","1.4","Edit: Mel")     register_concmd("paint","draw",ADMIN_LEVEL_C,"[R] [G] [B] <paint on the wall ??>")     register_concmd("clearpaint","flush",ADMIN_LEVEL_C,"[Player] <flush paint ??>")     register_cvar("paint_limit","50")     paint = 0;     //return PLUGIN_CONTINUE No need for this } public draw(id, level, cid) {     if (!cmd_access(id,level,cid,0)) return PLUGIN_HANDLED     if(paint > get_cvar_num("paint_limit") ) return PLUGIN_HANDLED;     // Get the colors.     new arg[32]     read_argv(1,arg,31)     new r = str_to_num(arg)     if(!r) r = random_num(0,255)     read_argv(2,arg,31)     new g = str_to_num(arg)     if(!g) g = random_num(0,255)     read_argv(3,arg,31)     new b = str_to_num(arg)     if(!b) b = random_num(0,255)     new endpoint[3]     get_user_origin(id, endpoint, 3)     new entid = create_entity("info_target")     if(!entid) return PLUGIN_HANDLED;     // I use a different classname, since it could conflict in HLDM.     entity_set_string(entid, EV_SZ_classname, "paint_dot")     entity_set_edict(entid, EV_ENT_owner, id)     entity_set_int(entid, EV_INT_movetype, MOVETYPE_NONE)     entity_set_int(entid, EV_INT_solid, SOLID_NOT)     // I suggest glow shell, but this should work too.     set_rendering(entid, kRenderFxNoDissipation, r, g, b, kRenderGlow, 255)     entity_set_model(entid, "sprites/dot.spr")     new Float:Vec[3]     IVecFVec(endpoint, Vec)     entity_set_origin(entid, Vec)     paint++;     return PLUGIN_HANDLED } public flush(id, level, cid) {     if (!cmd_access(id,level,cid,0)) return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new ownerid = str_to_num(arg)     if(!ownerid)     {         remove_entity_name("paint_dot")         paint = 0;     }     else remove_by_owner(ownerid,"paint_dot")     return PLUGIN_HANDLED } public remove_by_owner(id,classname[]) {     new iEntity = find_ent_by_owner ( -1, classname, id, 0 )     while (iEntity > 0)     {         paint--;         remove_entity(iEntity)         iEntity = find_ent_by_class(-1, classname)     }     return 1; } public plugin_precache() precache_model("sprites/dot.spr");

I also hacked in a little limiter, and you can now specify if you want to remove only one persons ents.

Sorry if I butchered your plugin in any way, I just reduced it to simplest terms (in my standards) and edited it. Hope I helped ^^

- Mel

genesis 03-28-2005 14:10

yeah the simple limiter works but I mean something kinda like this

if (maximum entities hit for engine)
clear all paint entities



not some arbritrary number, because like on dust i can paint 200 paints easy, goto de_torn and I bet I can only do 10

it may be related to the precache limit of 512 ??

entity_count ( ) I found this function, I just dont have time right now to test it but at some number presumably 512 the server crashes.

Freecode 03-28-2005 14:21

u forgot 1 more X in that picture u traitor

lucky109 03-28-2005 14:36

why i can't download the plugins and i can't compile to amxx when i put the sma to compile amxx.......

it show ERROR!

genesis 03-28-2005 14:37

Quote:

u forgot 1 more X in that picture u traitor

uh . uh .. it's there just the screenshot cut it off.



also i added the raw amxx file if the online compiler fails as it usually does.

lucky109 03-28-2005 14:42

i can change to amxx now (amxx 1.1)
(amx 1.0) can't compile...

genesis 03-28-2005 14:54

yes this will compile only wlth the latest version of amxx sorry for any inconvience I thank you for your time.


All times are GMT -4. The time now is 18:02.

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