AlliedModders

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

Alka 04-18-2007 09:44

[SOLVED]scenario
 
Hi.I want to know how to use this type of message....(an exemple..)

http://wiki.amxmodx.org/index.php/Ha...vents#Scenario

"SOLVED" Thanks... :)

Ryu2877 04-18-2007 10:39

Re: [SOLVED]scenario
 
PHP Code:

new const CLEAR 0
new iScenarioMsgID
 
public plugin_init()
{
......
  
iScenarioMsgID get_user_msgid("Scenario")
......
}
 
.....
 
stock manage_Scenario_hud(idact)
{
//show current grenade state on down screen front of "money" icon
 
if ( !is_user_connected(id) && !is_user_alive(id) )
  return 
0
 
 
if ( act == CLEAR )
 {
  
message_begin(MSG_ONEiScenarioMsgID_id)
  
write_byte(0)//  Active
  
return message_end()
 }
 new 
type iUserNadeCurType[id]
 
message_begin(MSG_ONEiScenarioMsgID_id)
 
write_byte(1)//  Active
 
write_string(sNadeStateString[type])//  Sprite
 
write_byte(100)//  Alpha
 
write_short(0)//  FlashRate
 
write_short(0)//  Unknown
 
return message_end()


snippet from my "M4withM203" plugin.
http://forums.alliedmods.net/showthread.php?t=51086


All times are GMT -4. The time now is 20:53.

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