Raised This Month: $ Target: $400
 0% 

problem with set_task


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maximus.toby
Junior Member
Join Date: Mar 2012
Old 08-26-2013 , 11:58   problem with set_task
Reply With Quote #1

Hello Everyone
i am trying to make my Deathmatch day, but my set_task don't work!
he don't start my day but he give every 10 sec just the text"^4[^1Funday^4]^1 Deathmatch day will start in 10 seconds!")
it also don't start my day, can someone help me with this please,


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <colorchat>
#include <fakemeta>

#define PLUGIN "[Fa] Day: Dm"
#define VERSION "1.0"
#define AUTHOR "Sh0x"

forward jailbreak_day_start(dayid)
forward jailbreak_day_end()
native jailbreak_day_add(name[32], description[200], blockgunsweaponsurvivorblockdamage)

new 
intDayintMaxplayers

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add: Day
    
intDay jailbreak_day_add("Deathmatch Day""Terrorists needs to kill each other, surviver wins"1011)
    
    
// Others
    
intMaxplayers get_maxplayers()
}
public 
jailbreak_day_start(dayid)
{
    
set_task(10.0"jailbreak_day_start")
    
ColorChat(0GREY"^4[^1Funday^4]^1 Deathmatch day will start in 10 seconds!")

    if(
dayid == intDay)
    {
        for(new 
1<= intMaxplayersi++)
        {
            if(
is_user_alive(i))
            {
                if(
cs_get_user_team(i) == CS_TEAM_T)
                {
                    
strip_user_weapons(i)

                    
give_item(i"weapon_m249")
                    
cs_set_user_bpammo(iCSW_M249400)
                
                        
                    
set_user_health(i400)
                }
            }
        }        
        
server_cmd("mp_friendlyfire 1")
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1029\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by maximus.toby; 08-26-2013 at 11:59.
maximus.toby is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 08-26-2013 , 12:28   Re: problem with set_task
Reply With Quote #2

set_task(10.0, "jailbreak_day_start")

What is dayid in jailbreak_day_start

??

set_task(10.0, "jailbreak_day_start",dayid)
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
maximus.toby
Junior Member
Join Date: Mar 2012
Old 08-28-2013 , 15:38   Re: problem with set_task
Reply With Quote #3

stil not working, can someone els help me please! really wanne fix that ^^
maximus.toby is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 08-28-2013 , 16:27   Re: problem with set_task
Reply With Quote #4

you got an infinite loop there mate
if you don't post the full plugin or at least the part that triggers jailbreak_day_start I can't help you

edit:: and if this is the whole plugin then it's horrible coding and can't easily be repaired

Last edited by aron9forever; 08-28-2013 at 16:28.
aron9forever is offline
Reply


Thread Tools
Display Modes

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 18:47.


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