Discuz! Board

标题: [代码|Code]白云特效|Cloud Sphere [打印本页]

作者: Jerry小坏    时间: 2017-7-13 16:54
标题: [代码|Code]白云特效|Cloud Sphere

  1. new CloudSphere

  2. public CloudSphereFX( id )
  3. {
  4.     for(new i; i < 30; i++)
  5.     {
  6.         new org[3];
  7.         get_user_origin(id, org);
  8.         message_begin( MSG_PVS, SVC_TEMPENTITY, org );
  9.         write_byte( TE_BEAMENTPOINT );
  10.         write_short( id ); //start entity
  11.         write_coord( org[0] + random_num(-200, 200)); //end position X
  12.         write_coord( org[1] + random_num(-200, 200)); //end position Y
  13.         write_coord( org[2] + random_num(-200, 200)); //end positon Z
  14.         write_short( CloudSphere ); //set spr file
  15.         write_byte( 3 ); //starting frame
  16.         write_byte( 5 ); //frame rate in 0.1's
  17.         write_byte( 30 ); //life in 0.1's
  18.         write_byte( 255 ); //line width in 0.1's
  19.         write_byte( 0 ); //noise amplitude in 0.01's
  20.         write_byte( 10 ); //R
  21.         write_byte( 10 ); //G
  22.         write_byte( 10 ); //B
  23.         write_byte( 250 ); //Brightness
  24.         write_byte( 20 ); //scroll speed in 0.1's
  25.         message_end( );
  26.     }
  27.     set_task(0.5, "CloudSphereFX", id)  
  28. }

  29. public plugin_precache()
  30. {
  31.     CloudSphere = precache_model( "sprites/stmbal1.spr" );
  32. }  
复制代码
Description:
[CN]
这个特效其实和CCI里的AddFx(Client, "fxSpriteRays", "sprites/stmbal1.spr", 0.1, 30, 255, 0, 10, 10, 10, 250, 20, 700, 0, 3)一样[]

[EN]
This effect is actually same as 'AddFx(Client, "fxSpriteRays", "sprites/stmbal1.spr", 0.1, 30, 255, 0, 10, 10, 10, 250, 20, 700, 0, 3)' in CCI.






欢迎光临 Discuz! Board (https://esfbbs.foxnyx.top/) Powered by Discuz! X3.2