‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
clientfield_shared.gsc
Go to the documentation of this file.
1 #insert scripts\shared\shared.gsh;
2 
3 #namespace clientfield;
4 
18 function register( str_pool_name, str_name, n_version, n_bits, str_type )
19 {
20  RegisterClientField( str_pool_name, str_name, n_version, n_bits, str_type );
21 }
22 
34 function ‪set( str_field_name, n_value )
35 {
36  if( self == level )
37  {
38  CodeSetWorldClientField( str_field_name, n_value );
39  }
40  else
41  {
42  CodeSetClientField(self, str_field_name, n_value );
43  }
44 }
45 
46 
58 function ‪set_to_player( str_field_name, n_value )
59 {
60  CodeSetPlayerStateClientField( self, str_field_name, n_value );
61 }
62 
63 
75 function ‪set_player_uimodel( str_field_name, n_value )
76 {
77  if ( !IsEntity( self ) )
78  return;
79 
80  CodeSetUIModelClientField( self, str_field_name, n_value );
81 }
82 
83 
94 function ‪get_player_uimodel( str_field_name )
95 {
96  return CodeGetUIModelClientField( self, str_field_name );
97 }
98 
110 function ‪increment( str_field_name, n_increment_count = 1 )
111 {
112  for ( i = 0; i < n_increment_count; i++ )
113  {
114  if ( self == level )
115  {
116  CodeIncrementWorldClientField( str_field_name );
117  }
118  else
119  {
120  CodeIncrementClientField( self, str_field_name );
121  }
122  }
123 }
124 
136 function ‪increment_uimodel( str_field_name, n_increment_count = 1 )
137 {
138  if ( self == level )
139  {
140  foreach ( player in level.players )
141  {
142  for ( i = 0; i < n_increment_count; i++ )
143  {
144  CodeIncrementUIModelClientField( player, str_field_name );
145  }
146  }
147  }
148  else
149  {
150  for ( i = 0; i < n_increment_count; i++ )
151  {
152  CodeIncrementUIModelClientField( self, str_field_name );
153  }
154  }
155 }
156 
157 
169 function ‪increment_to_player( str_field_name, n_increment_count = 1 )
170 {
171  for ( i = 0; i < n_increment_count; i++ )
172  {
173  CodeIncrementPlayerStateClientField( self, str_field_name );
174  }
175 }
176 
177 
188 function ‪get( str_field_name )
189 {
190  if( self == level )
191  {
192  return CodeGetWorldClientField( str_field_name );
193  }
194  else
195  {
196  return CodeGetClientField( self, str_field_name );
197  }
198 }
199 
200 
211 function ‪get_to_player( field_name )
212 {
213  return CodeGetPlayerStateClientField( self, field_name );
214 }
‪set_to_player
‪function set_to_player(str_field_name, n_value)
Definition: clientfield_shared.gsc:58
‪get
‪function get(str_field_name)
Definition: clientfield_shared.gsc:188
‪increment_to_player
‪function increment_to_player(str_field_name, n_increment_count=1)
Definition: clientfield_shared.gsc:169
‪increment
‪function increment(str_field_name, n_increment_count=1)
Definition: clientfield_shared.gsc:110
‪increment_uimodel
‪function increment_uimodel(str_field_name, n_increment_count=1)
Definition: clientfield_shared.gsc:136
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪set_player_uimodel
‪function set_player_uimodel(str_field_name, n_value)
Definition: clientfield_shared.gsc:75
‪get_player_uimodel
‪function get_player_uimodel(str_field_name)
Definition: clientfield_shared.gsc:94
‪get_to_player
‪function get_to_player(field_name)
Definition: clientfield_shared.gsc:211