Raised This Month: $12 Target: $400
 3% 

[HELP] scripting time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ms.itry
Member
Join Date: Apr 2018
Old 04-28-2018 , 09:08   [HELP] scripting time
Reply With Quote #1

Hello everyone
I'm want prepare this scripting please i need this help scripting

description for scripting

has cmd for active it
this game give you 1.30 minute (1.30 showing in hudmessage ) and when this time end players ct will die
please help

Last edited by ms.itry; 04-28-2018 at 09:11.
ms.itry is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 04-28-2018 , 10:46   Re: [HELP] scripting time
Reply With Quote #2

That would be simple for anyone

Just tell me a lil more so when some execute the command to start it :
There should be round restart right ??

And do u want to show all 1.30 min running and flashing in hud ?
( Or just want the start and end count down of it ? )
instinctpt1 is offline
ms.itry
Member
Join Date: Apr 2018
Old 04-28-2018 , 13:29   Re: [HELP] scripting time
Reply With Quote #3

Quote:
Originally Posted by instinctpt1 View Post
That would be simple for anyone

Just tell me a lil more so when some execute the command to start it :
There should be round restart right ??

And do u want to show all 1.30 min running and flashing in hud ?
( Or just want the start and end count down of it ? )

theres no need to be round restart
count can every one see it

Last edited by ms.itry; 04-28-2018 at 13:30.
ms.itry is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 04-29-2018 , 07:26   Re: [HELP] scripting time
Reply With Quote #4

TRY ( Untested )
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define ADMINFLAG ADMIN_BAN
#define MAXTIME 90

new TimesyncHudbool:hasStarted false

public plugin_init()
{
    
register_plugin("Time Mod""1.0""DiGiTaL")
    
register_clcmd("say /startmod""startMod"ADMINFLAG)
    
syncHud CreateHudSyncObj()
}

public 
startMod(idlvlcid)
{
    if(
hasStarted) return PLUGIN_HANDLED
    
else 
    if(!
cmd_access(idlvlcid0)) return PLUGIN_HANDLED
    Time 
0
    set_hudmessage
(502000, -1.00.35,16.012.0,0.1,  0.2, -1)
    
ShowSyncHudMsg(0syncHud"You got %i Seconds !!"MAXTIME)
    
hasStarted true
    set_task
(1.0"addtoTime"id 9090,_,_"b")

    return 
PLUGIN_HANDLED
}

public 
addtoTime(id)
{
    
Time++
    
set_hudmessage(502000, -1.00.90,06.012.0,0.1,  0.2, -1)
    
ShowSyncHudMsg(0syncHud"Time Elapsed : %i"Time)
    if(
Time == MAXTIME)
    {
        
id -= 9090
        remove_task
(id 9090)
        
set_hudmessage(200200200, -1.00.2504.02.0,0.10.1, -1)
        
show_hudmessage(0"Good Bye CTs")
        
set_task(0.5"KillCts")
    }
}

public 
KillCts()
{
    
ClearSyncHud(0syncHud)
    new 
players[32], count
    get_players
(playerscount"ae""CT")
    for(new 
icount;i++) user_silentkill(players[i])
    
hasStarted false

Command to start : /startmod ( User must have ADMIN_BAN flag ( flag : b ) to start mod )
instinctpt1 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 21:32.


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