Raised This Month: $ Target: $400
 0% 

Set_Task? [Solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-10-2010 , 09:50   Set_Task? [Solved]
Reply With Quote #1

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?
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%

Last edited by SaM.ThE.MaN; 10-11-2010 at 04:58.
SaM.ThE.MaN is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-10-2010 , 09:54   Re: Set_Task?
Reply With Quote #2

public ChoosePlayer
__________________
xPaw is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-10-2010 , 09:55   Re: Set_Task?
Reply With Quote #3

I think you forgot to add
ChosenPlayer(id)
{
set_user_health(id, 200)
}

public ChosenPlayer(id)
{
set_user_health(id, 200)
}
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
Old 10-10-2010, 09:55
SaM.ThE.MaN
This message has been deleted by SaM.ThE.MaN.
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-10-2010 , 09:57   Re: Set_Task?
Reply With Quote #4

Quote:
Originally Posted by xPaw View Post
public ChoosePlayer
OMG ... WHAT A SILLY MISTAKE !!! ,,, GRRRRR... , Concentrate Sam .. Contectrate (*Talking to myself -.-*)
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 10-10-2010 , 14:06   Re: Set_Task?
Reply With Quote #5

Quote:
Originally Posted by SaM.ThE.MaN View Post
OMG ... WHAT A SILLY MISTAKE !!! ,,, GRRRRR... , Concentrate Sam .. Contectrate (*Talking to myself -.-*)
Drugs are very bad.
Mxnn is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 03:12   Re: Set_Task?
Reply With Quote #6

Quote:
Originally Posted by Mxnn View Post
Drugs are very bad.
I dont really know what drugs look like ... i dont mean legal ones , i mean illegal ones
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 10-11-2010 , 04:49   Re: Set_Task?
Reply With Quote #7

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 .
__________________
5c0r-|3i0 is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 04:56   Re: Set_Task?
Reply With Quote #8

Quote:
Originally Posted by 5c0r-|3i0 View Post
@ Sam: You need drugs , lol...
You have to loop through the players , then condition ( or not ) , then set_task .
dude ... i already fixed this problem ... -.- , i fixed it yesterday ....,

Edit : drugs .. i think if i take em , i might get dizzy , ROFL
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 10-11-2010 , 04:57   Re: Set_Task?
Reply With Quote #9

Quote:
Originally Posted by 5c0r-|3i0 View Post
@ Sam: You need drugs , lol...
You have to loop through the players , then condition ( or not ) , then set_task .
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 View Post
dude ... i already fixed this problem ... -.- , i fixed it yesterday ....,
You might want to delete that id there, it's not used.
__________________
Hunter-Digital is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-11-2010 , 05:00   Re: Set_Task?
Reply With Quote #10

Quote:
Originally Posted by Hunter-Digital View Post
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
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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