AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Where is error? (https://forums.alliedmods.net/showthread.php?t=210727)

bloody806 03-13-2013 17:35

Where is error?
 
Hi all i need help.. This plugin i can normal compile but in game dont work. Can somebody tell me why? Please help


PHP Code:

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

new timer
new boolcountdownon

const FFADE_STAYOUT 0x0004

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(
cs_get_user_team(id) == CS_TEAM_CT// Only For CT
        
{
        }
    }
}
public 
countdown_start(id)
{
    if(
timer >= 0
    {
        if(
timer == 0
        {
            
countdownon false 
            
if(cs_get_user_team(id) == CS_TEAM_CT// Only For CT
            
{            
                 
// screenfade
                     
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _id)
                     
write_short(5// time duration in seconds
                     
write_short(5)
                     
write_short(FFADE_STAYOUT)
                     
write_byte(0// red
                     
write_byte(0// green
                     
write_byte(0// blue
                     
write_byte(255// alpha
                     
message_end()

                     
set_user_gravity(id,5000.0)
                     
set_task(5.0,"gravity",id)
           }
            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 
}  

public 
gravity(id)
{
    
set_user_gravity(id,1.0)



Torge 03-13-2013 17:52

Re: Where is error?
 
As far as I know, "logevent" has no parameters.

ConnorMcLeod 03-14-2013 02:15

Re: Where is error?
 
Code is full of errors.

simanovich 03-14-2013 03:52

Re: Where is error?
 
dafuq lol

All code is wrong

ConnorMcLeod 03-14-2013 04:41

Re: Where is error?
 
Code fixed.

Spoiler


You may want to use this though :

Spoiler

bloody806 03-14-2013 10:48

Re: Where is error?
 
Very thanks ConnorMcLeod :)


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

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