AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Wall Text (https://forums.alliedmods.net/showthread.php?t=89238)

stupok 04-03-2009 22:42

Wall Text
 
1 Attachment(s)
Wall Text
v1.09

Description
This plugin converts chat messages to decals and paints them on the wall. You are limited to capital A-Z and 0-9.

Messages are repainted on client connect and new round.
Usage
Commands:

amx_walltext "I am using walltext yay"
If you don't want to use the menu, you can use this.

amx_walltextmenu or say walltextmenu
This brings up a menu to control the plugin.

Note: Deleted or unsaved decals will disappear on new round.
Special Features:

You can do multiline messages:
Put a comma ( , ) to move down to the next line.

You can display dynamic text:
Edit the walltext-mapname.ini file. Instead of your regular message, type the full path of a text file you want the plugin to read. It will only read the first line and use that as your message.

Note: The path to your file starts in the 'cstrike' directory. To display the first line of your motd.txt, use motd.txt as your message.
Files
The plugin will save messages to:
amxmodx\configs\maps\walltext-mapname.ini

This is the format:
( Origin XYZ, Direction XYZ, Text )
Code:

-2313.605468;-1173.158447;0.031257;0.000000;12.000000;0.000000;YOUR MESSAGE HERE
This one will print the first line of your motd.txt:
Code:

-2313.605468;-1173.158447;0.031257;0.000000;12.000000;0.000000;motd.txt
Changelog

04/03/09 - v1.0
Initial release.

04/04/09 - v1.01
Mod-independent!

04/04/09 - v1.02
Removed decal_reset.sc event. DoD doesn't have it. O_o

04/04/09 - v1.03
New menu, say command, trivial changes.

04/07/09 - v1.04
Changed commands, should be simpler. Attempted to prevent The Specialists error. Still need to find an event for TS like new round.

06/27/09 - v1.05
Added for cstrike only: New menu option "Refresh Canvas" deletes unsaved messages.

06/28/09 - v1.06
Fixed incorrect code dealing with TE_WORLDDECAL and TE_WORLDDECALHIGH. This problem caused incompatibility with Sven Coop.

06/28/09 - v1.07
> 256 changed to > 255

07/13/09 - v1.08
HLTV event registered only if it exists, TFC didn't have it
Any mod with decal_reset.sc event gets a "Refresh Canvas" menu option

07/14/09 - v1.09
Added a slight delay for the "Refresh Canvas" option so the decals get drawn 0.2 seconds after they are erased

Cvars (Regular HL Cvars)
Brought to you by: http://scripting.elxdraco.net/cvarlist/
mp_decals 300
It sets the maximum decals* visible on the screen. It has to be set before connection to server. It's not the same as r_decals.

r_decals 4096
It sets the decals* limit. If higher than mp_decals, it will be set to mp_decals value (It's reset to mp_decals value when connecting to server). It's not the same as mp_decals.

*Spray logo, bullet holes, grenade scorch, blood on ground
Examples


[IMG]http://img10.**************/img10/1939/dedust0002j.th.jpg[/IMG]
[IMG]http://img9.**************/img9/167/dedust0004.th.jpg[/IMG]
Yes, the orientation of the decals depends on the textures of the map. :(
[IMG]http://img6.**************/img6/5843/dedust0006i.th.jpg[/IMG]
Please criticize my code, make suggestions, report bugs, and leave your opinion. Thanks!

Downloads:
v1.04 - 567
v1.05 - 35
v1.06 - 19
v1.07 - 326
v1.08 - 57

AlejandroSk 04-03-2009 22:55

Re: Wall Text
 
OMG NICE! +k

joaquimandrade 04-03-2009 22:56

Re: Wall Text
 
Fuck Alejandro. I was about saying: First.

Nice, stupok. Taking a look at the code now.

Edit:

I've looked at the code now. There isn't much to say. Its pretty straight forward, there's nothing to optimize i guess. The only think i can see that you can modify is in "CreateNewMessage()":

PHP Code:

fAimVector[0] = fAimVector[0] * 9999.0 fPlayerOrigin[0]
    
fAimVector[1] = fAimVector[1] * 9999.0 fPlayerOrigin[1]
    
fAimVector[2] = fAimVector[2] * 9999.0 fPlayerOrigin[2]
    
    
// execute traceline, grab normal vector and end position
    
new iTr create_tr2()
    
engfuncEngFunc_TraceLinefPlayerOriginfAimVectorIGNORE_MONSTERSidiTr )
    
get_tr2iTrTR_vecEndPosfAimOrigin )
    
get_tr2iTrTR_vecPlaneNormalfNormalVector )
    
free_tr2iTr 

Changing the 9999.0 to a closer, clearly visible, position, check if the trace "happened" and if don't say something like "You are too distant from a wall".

Nothing, really.

Edit 2:

What about cvars to change the colors/backgrounds of the printed characters?

fysiks 04-03-2009 23:36

Re: Wall Text
 
CS only btw :cry:

alan_el_more 04-03-2009 23:50

Re: Wall Text
 
GJ :)

Vm|Mayhem 04-04-2009 01:01

Re: Wall Text
 
Great idea for a plugin stupok.

tuty 04-04-2009 02:28

Re: Wall Text
 
holy shit :shock::shock::shock:

nice job man :up:

Alucard^ 04-04-2009 02:44

Re: Wall Text
 
man i am searching this type of plugin for a lot of time... something easy to put an advertising without use sprites or something like this...

just, i love it! The best advertising plugin

ILUSION 04-04-2009 03:13

Re: Wall Text
 
Awesome, thanks you, I will test it now!

Good job :D

TheRadiance 04-04-2009 04:21

Re: Wall Text
 
Awesome! I <3 it!


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

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