AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Task frame (https://forums.alliedmods.net/showthread.php?t=90958)

MPNumB 04-24-2009 23:09

Task frame
 
1 Attachment(s)
Description:
Since 2009/Aprile/20 Half-Life update "_special" scripts no longer work. For some of us it's maybe needed to test some things for plugins what we are willing to create.


Usege:
task_frames <frame number> <command> - executes a command line in selected amount of frames.

For example I used this code to test is silent-run working in "Counter-Strike 1.6 Beta":
Code:

bind MOUSE3 +silentrun
 
alias +silentrun "silentrun;alias sr silentrun"
alias -silentrun "alias sr"
 
alias silentrun "duck_1;duck_2;duck_3;duck_4;duck_5"
alias duck_1 "task_frames 1 +duck"
alias duck_2 "task_frames 2 -duck"
alias duck_3 "task_frames 22 +duck"
alias duck_4 "task_frames 24 -duck"
alias duck_5 "task_frames 32 sr"



Additional info:
Tested with amxmodx 1.8.1 on Counter-Strike 1.6.


Note:
Command can be executed only on person who started a lan game, or only in hlsd console if server is dedicated.


Change-Log:

* 1.0
- First release.

meTaLiCroSS 04-24-2009 23:17

Re: Task frame
 
Sounds good...

Nice job :)

alan_el_more 04-25-2009 08:31

Re: Task frame
 
nice... +k :D

M1R0n,M' 04-25-2009 09:33

Re: Task frame
 
client_print(MPNumB, print_chat, " GOOD JOB :) ");

minimiller 04-25-2009 09:44

Re: Task frame
 
Quote:

Originally Posted by M1R0n,M' (Post 813704)
client_print(0, print_chat, " GOOD JOB :) ");

Why are you printing the message to all players (0)?
Index is a players index from 0 - Number of last thread post
Try this:
client_print(1, print_chat, " GOOD JOB :) ");

Joke dude ;)
Nice plugin numb

Exolent[jNr] 04-25-2009 12:35

Re: Task frame
 
Nice job!

MPNumB 04-25-2009 13:24

Re: Task frame
 
There is a little difference in client_print and console_print. console_print(0, "text") prints "text" to the server console. client_print(0, print_console, "text") prints "text" to all clients.

But ya, good that you noticed that. Changed console_print to server_print there also - will take less CPU.

P.S. Not adding in changelog and not updating version cuz changes aren't that big.

SchlumPF* 04-25-2009 14:32

Re: Task frame
 
client_print(MPNumB, print_chat, " GOOD JOB :) "); will give you an error cuz MPNumB is aundefined var. use this:
client_print(find_player("aj", "MPNumB", print_chat, " GOOD JOB :) ");

xPaw 04-25-2009 14:35

Re: Task frame
 
This is more accurate :)
PHP Code:

new iNumb find_player"aj""MPNumB" );

client_printiNumbprint_chat"GOOD JOB :D" ); 


Exolent[jNr] 04-25-2009 14:39

Re: Task frame
 
Quote:

Originally Posted by SchlumPF* (Post 813901)
client_print(find_player("a", "MPNumB", print_chat, " GOOD JOB :) ");

Quote:

Originally Posted by xPaw (Post 813904)
This is more accurate :)
PHP Code:

new iNumb find_player"aj""MPNumB" );

client_printiNumbprint_chat"GOOD JOB :D" ); 


How? It does the same thing.

You could do this:
Code:

static MPNumB;
if( (MPNumB = find_player("aj", "MPNumB")) )
    client_print(MPNumB, print_chat, "GOOD JOB! :D");



All times are GMT -4. The time now is 13:29.

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