AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Set_Task? [Solved] (https://forums.alliedmods.net/showthread.php?t=140278)

SaM.ThE.MaN 10-10-2010 09:50

Set_Task? [Solved]
 
This isnt working ...

My task is supposed to work after 10 seconds , but i get this warning :

PHP Code:

#include <amxmodx> 
#include <fun> 
#include <cstrike>

public plugin_init( ) 

    
register_logevent"EventRoundStart"2"1=Round_Start" ); 
}

public 
EventRoundStart(id

    
set_task(10.0"ChoosePlayer"id)


ChoosePlayer( ) 

    new 
iPlayers32 ], iNum
    
get_playersiPlayersiNum"ae""CT"); 
     
    if( 
iNum 
    { 
        
ChosenPlayeriPlayers[ ( iNum ) ? randomiNum ) : ] );
    } 
}

ChosenPlayer(id

    
set_user_health(id200)


Error:

PHP Code:

WarningSymbol is never used"ChoosePlayer" on line 30
Warning
Symbol is never used"ChosenPlayer" on line 30 

I have set ChoosePlayer ... in set task , but since its not running the event , its giving me the 2nd warning too , so all i need to fix is the first one ... but how?

xPaw 10-10-2010 09:54

Re: Set_Task?
 
public ChoosePlayer

zirualas 10-10-2010 09:55

Re: Set_Task?
 
I think you forgot to add
ChosenPlayer(id)
{
set_user_health(id, 200)
}
:arrow:
public ChosenPlayer(id)
{
set_user_health(id, 200)
}

SaM.ThE.MaN 10-10-2010 09:57

Re: Set_Task?
 
Quote:

Originally Posted by xPaw (Post 1321146)
public ChoosePlayer

OMG ... WHAT A SILLY MISTAKE !!! ,,, GRRRRR... , Concentrate Sam .. Contectrate (*Talking to myself -.-*)

Mxnn 10-10-2010 14:06

Re: Set_Task?
 
Quote:

Originally Posted by SaM.ThE.MaN (Post 1321149)
OMG ... WHAT A SILLY MISTAKE !!! ,,, GRRRRR... , Concentrate Sam .. Contectrate (*Talking to myself -.-*)

Drugs are very bad.

SaM.ThE.MaN 10-11-2010 03:12

Re: Set_Task?
 
Quote:

Originally Posted by Mxnn (Post 1321356)
Drugs are very bad.

I dont really know what drugs look like ... i dont mean legal ones , i mean illegal ones

5c0r-|3i0 10-11-2010 04:49

Re: Set_Task?
 
Quote:

public EventRoundStart(id)
{
set_task(10.0, "ChoosePlayer", id)
}
@ Sam: You need drugs , lol...
You have to loop through the players , then condition ( or not ) , then set_task :oops: .

SaM.ThE.MaN 10-11-2010 04:56

Re: Set_Task?
 
Quote:

Originally Posted by 5c0r-|3i0 (Post 1321884)
@ Sam: You need drugs , lol...
You have to loop through the players , then condition ( or not ) , then set_task :oops: .

dude ... i already fixed this problem ... -.- , i fixed it yesterday ....,

Edit : drugs .. i think if i take em , i might get dizzy , ROFL

Hunter-Digital 10-11-2010 04:57

Re: Set_Task?
 
Quote:

Originally Posted by 5c0r-|3i0 (Post 1321884)
@ Sam: You need drugs , lol...
You have to loop through the players , then condition ( or not ) , then set_task :oops: .

Well, he picks a random player in that function, but id is useless there, so he should delete it from the function and set_task().

Quote:

Originally Posted by SaM.ThE.MaN (Post 1321888)
dude ... i already fixed this problem ... -.- , i fixed it yesterday ....,

You might want to delete that id there, it's not used.

SaM.ThE.MaN 10-11-2010 05:00

Re: Set_Task?
 
Quote:

Originally Posted by Hunter-Digital (Post 1321891)
Well, he picks a random player in that function, but id is useless there, so he should delete it from the function and set_task().


You might want to delete that id there, it's not used.

Explain it to him in details .. so he understands -.- ...

Edit : Perhaps he needs drugs too , haahhaha

2nd Edit : I dont have an id in that place . I never added one . Not that noobish xD


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

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