Raised This Month: $ Target: $400
 0% 

message_begin seem do not work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
larnk
Member
Join Date: Dec 2004
Old 02-16-2005 , 22:40   message_begin seem do not work
Reply With Quote #1

I want to force a player using knife and wrote such code
Code:
public plugin_init(){   register_plugin("Only Knife","0.1","Zhao")   register_event("CurWeapon","weapon_trigger","b","1=1") } public weapon_trigger(id){   new wpnindex=read_data(2)   client_print(id,print_chat,"Receive Weapon %d",wpnindex)//Only For Debug   if(wpnindex!=CSW_KNIFE){       engclient_cmd(id,"weapon_knife")  //This function do not send a CurWeapon message of knife       new ids[1]      ids[0]=id      set_task(1.0,"fake_weapon_msg",0,ids,1) //I want to send a knife weapon msg   } public fake_weapon_msg(ids[]){     new id=ids[0]     client_print(id,print_chat,"Weapon Knife Msg is sent to %d",id)//For Debug     message_begin(MSG_ONE,get_user_msgid("CurWeapon"),{0,0,0},id)     write_byte(1)     write_byte(CSW_KNIFE)     write_byte(-1)     message_end()     return PLUGIN_HANDLED }

I got "Weapon Knife msg is sent to 1" in chat message,but Can not recive the knife message ...
How to resolve this problem? Thanks....
larnk is offline
 



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 19:19.


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