AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Some message questions (https://forums.alliedmods.net/showthread.php?t=170833)

.Dare Devil. 10-29-2011 11:51

Some message questions
 
hi,

I want to know some things.

If id or whatever index is wrong then this message here crash the server?

PHP Code:

 message_begin(MSG_PVSSVC_TEMPENTITYorigin)
  
write_byte(TE_DLIGHT// TE id
  
write_coord(origin[0]) // x
  
write_coord(origin[1]) // y
  
write_coord(origin[2]) // z
  
write_byte(floatround(GRANATE_LGHT_RADIUS/5.0)) // radius
  
write_byte(255); // red
  
write_byte(128); // green
  
write_byte(0); // blue
  
write_byte(5// life
  
write_byte(25// decay rate
  
message_end() 

Q:2


If id or whatever index is wrong then this message here crash the server?
PHP Code:

 message_begin(MSG_ONEg_msgFlashlight_id)
  
write_byte(g_flashlight[id]) // toggle
  
write_byte(g_flashbattery[id]) // battery
  
message_end() 


Arkshine 10-29-2011 11:54

Re: Some message questions
 
- You don't even pass an id...
- if id <= 0 or > maxslots, it will most likely crash.


All times are GMT -4. The time now is 14:28.

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