AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   im new (https://forums.alliedmods.net/showthread.php?t=26241)

Ripiz 03-29-2006 08:19

im new
 
Hi, and thanks that you read it.
I'm new at AMX scripting so at the moment I just trying to change other plugins so they still work corectly.

Is there a command to make plugin wait like 1 sec ? I mean...
something like auto-jumper, player will just and after 5 sec he will jump again, how to do this ? i need just that wait/sleep/pause


P.S. shorter: how to pause plugin for few sec and then resume it ? it should be automaticaly

[ --<-@ ] Black Rose 03-29-2006 08:43

this?
Code:
set_task(Float:time, "function", id = 0)

Ripiz 03-29-2006 08:47

yeh I think .. I'm new so i dont what that is :)
ir cmopiler successfuly, all i can to test it

if i type 1 as time how much time it will take ?

Timoses 03-29-2006 08:53

You have to put in
Code:

1.0
since it's a Float.
and it is in seconds, I believe..

[ --<-@ ] Black Rose 03-29-2006 08:54

Quote:

Originally Posted by Timoses
You have to put in
Code:

1.0
since it's a Float.
and it is in seconds, I believe..

exactly

and you would need to replace the "function" with whatever fuction it would trigger after the defined time

Ripiz 03-29-2006 09:15

i need to continue function ...

if really im changing glow plugins, i want to make player glow and keep changing colors

Code:

        if(equali(arg2,"colorful")){
                client_print(0,print_chat,"User: %s Has started changing colors!!!",plrname)
                set_user_rendering(player,kRenderFxGlowShell,colorful[0],colorful[1],colorful[2],kRenderNormal,16)
                //pause here for 0.2 sec is possible
                set_user_rendering(player,kRenderFxGlowShell,colorful[4],colorful[5],colorful[6],kRenderNormal,16)
                //pause here for 0.2 sec is possible
                set_user_rendering(player,kRenderFxGlowShell,colorful[7],colorful[8],colorful[9],kRenderNormal,16)
                //repeat this all again, again and again
                return PLUGIN_HANDLED
        }

i need to put pause between(im not shore this work is right) color change

[ --<-@ ] Black Rose 03-29-2006 09:27

Code:
if ( equali(arg2,"colorful") ) {     client_print(0,print_chat,"User: %s Has started changing colors!!!",plrname)     set_task(0.2, "color1", player) } public color1(id) {     set_user_rendering(id,kRenderFxGlowShell,colorful[0],colorful[1],colorful[2],kRenderNormal,16)     set_task(0.2, "color2", id) } public color2(id) {     set_user_rendering(id,kRenderFxGlowShell,colorful[4],colorful[5],colorful[6],kRenderNormal,16)     set_task(0.2, "color3", id) } public color3(id) {     set_user_rendering(player,kRenderFxGlowShell,colorful[7],colorful[8],colorful[9],kRenderNormal,16)     set_task(0.2, "color1", id) }

Ripiz 03-29-2006 09:41

um..

i know where to put
Code:
if ( equali(arg2,"colorful") ) {     client_print(0,print_chat,"User: %s Has started changing colors!!!",plrname)     set_task(0.2, "color1", player) }
but where to put
Code:
public color1(id) {     set_user_rendering(id,kRenderFxGlowShell,colorful[0],colorful[1],colorful[2],kRenderNormal,16)     set_task(0.2, "color2", id) } public color2(id) {     set_user_rendering(id,kRenderFxGlowShell,colorful[4],colorful[5],colorful[6],kRenderNormal,16)     set_task(0.2, "color3", id) } public color3(id) {     set_user_rendering(player,kRenderFxGlowShell,colorful[7],colorful[8],colorful[9],kRenderNormal,16)     set_task(0.2, "color1", id) }

??

Timoses 03-29-2006 09:43

Just somewhere.. I believe..

[ --<-@ ] Black Rose 03-29-2006 10:13

anywhere, just not in another function


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

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