AlliedModders

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

bloody806 03-09-2013 21:36

[Help]Freeze dontwork
 
Hi i need help with this plugin. Plugin you freeze until the end of deduction, but dont work freeze :cry: Please help.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <engine>

new timer
new boolcountdownon

public plugin_init()
{
    
register_plugin("Naskok","1.0","Risontek")
    
register_logevent("odpocet"2"1=Round_Start")
}

public 
odpocet(id)
{
    if(!
countdownon
    { 
        
timer 5
        countdownon 
true 
        countdown_start
(id
        if(
get_user_team(id) == 1)
        {
            
set_pev(idpev_flagspev(idpev_flags) | FL_FROZEN)
        }
    }
}
public 
countdown_start(id)
{
    if(
timer >= 0
    {
        if(
timer == 0
        {
            
countdownon false 
            
if(get_user_team(id) == 1)
            {
                
set_pev(idpev_flagspev(idpev_flags) & ~FL_FROZEN)
            }
            return 
PLUGIN_HANDLED
        
}
        
set_hudmessage(02550, -1.00.3001.01.0
        
show_hudmessage(0"Anti-Furien have a head start: %i"timer
        
timer-- 
        
set_task(1.0"countdown_start")
    }
    return 
PLUGIN_CONTINUE 



Podarok 03-10-2013 10:30

Re: [Help]Freeze dontwork
 
Instead of freeze try putting
Code:
set_user_maxspeed(id, 1.0);
And there is a team check by the way, so only TEAM_T freeze i guess

Bos93 03-10-2013 11:15

Re: [Help]Freeze dontwork
 
Round_Start - global event

public odpocet(id) --> public odpocet( )

use get_maxplayers()


All times are GMT -4. The time now is 21:50.

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