Raised This Month: $ Target: $400
 0% 

Repeat Shake Screen and crash server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
VINAGHOST
Member
Join Date: Aug 2016
Location: Việt Nam
Old 02-28-2017 , 07:55   Repeat Shake Screen and crash server
Reply With Quote #1

When I chat /heroin i got a error "Host_Error WriteDest_Parm not a client"
And this is my code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "HEROIN"
#define VERSION "1.0"
#define AUTHOR "VINAGHOST"


#define    HRI 156


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /heroin""buyheroin");
    
register_clcmd("say_team /heroin""buyheroin");    
}

public 
buyheroin(id)
{    
    if( !
is_user_alive(id))
    {
        
client_print(id,print_chat"You died ==!")
        return 
PLUGIN_CONTINUE;
    }
    if( 
cs_get_user_money(id) < 10000 )
    {
        
client_print(id,print_chat"You don't have enough money ==")
        return 
PLUGIN_CONTINUE;
    }
        
    
cs_set_user_money(idcs_get_user_money(id) - 10000)
    new 
di[1]
    
di[0] = id
    set_task
(10.0"shake"HRI iddi,1,_,1)
    
    return 
PLUGIN_HANDLED
    
}
public 
shake(di[])
{
    new 
id str_to_num(di)
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("ScreenShake"), {0,0,0}, id)  // Shake Screen
    
write_short(1<<14)
    
write_short(1<<14)
    
write_short(1<<14)
    
message_end()  
}
public 
client_connect(id)
{
    
remove_task(HRI id)
    return 
PLUGIN_HANDLED
}

public 
client_disconnect(id)
{
    
remove_task(HRI id)
    return 
PLUGIN_HANDLED
}

public 
death()
{
    new 
id read_data(2)    
    
remove_task(HRI id)

so how could I repeat shaking screen player ?

Sorry for my bad English ._.
VINAGHOST is offline
 


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 20:55.


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