AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]String help (https://forums.alliedmods.net/showthread.php?t=2468)

rompom7 06-06-2004 04:44

[SOLVED]String help
 
Hello, my first script, I just need a little help with the strings.


Here is the code
Code:
/* Live on 3 Plugin By Rompom7 */ #include <amxmodx> new PLUGIN[]="WarBot" new AUTHOR[]="rompom7" new VERSION[]="1.00" public plugin_init() {      register_plugin(PLUGIN, VERSION, AUTHOR)      register_concmd("amx_warbot", "warstart") } public restart(time01[]) {     set_cvar_num("sv_restartround", str_to_num(time01))     return PLUGIN_CONTINUE } public warstart() {     set_task(3.0,"text",0,"Live on 3 Restarts",1)     set_task(3.0,"restart",0,"1",1)     set_task(6.0,"text",0,"Live on 2 Restarts",1)     set_task(6.0,"restart",0,"1",1)     set_task(9.0,"text",0,"Live on 1 Restart",1)     set_task(9.0,"restart",0,"3",1)     set_task(12.0,"text",0,"***LIVE LIVE LIVE***",1)     set_task(12.5,"text",0,"Good Luck and Have Fun",1)     return PLUGIN_HANDLED } public text(str01[30]) {     client_print(0, print_chat, str01)     return PLUGIN_CONTINUE }

So what happens is when i join my dedicated, and i type amx_warbot into console it restarts 3 times, but the client_print only shows the first character of each string.

How do i make it show the whole string?

I know this plugin has been made before, i am only making it so i can get a grasp of Small.

Thanks all.

[FBX] 06-06-2004 06:16

your set task arguments only has 1 set for the #, thats why set_task(6.0,"text",0,"Live on 2 Restarts",1) should be set_task(6.0,"text",0,"Live on 2 Restarts",30)

rompom7 06-06-2004 07:18

Thanks for that, i am starting to get the hang of it :)


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

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