192 {
193 spawned_objects.Clear();
195
197 {
199
201 {
203 string color = item.ConfigGetString("color");
205 item_to_spawn = new_class_name;
206 }
207
209 {
211
212
213
214
215
216
217
218 object = player.GetInventory().CreateInInventory(item_to_spawn);
219 }
221 {
222
223
224
225
226
227
228 }
229
230
231 if (!object)
232 {
234
235 if (!object)
236 Error(
"failed to spawn entity "+item_to_spawn+
" , make sure the classname exists and item can be spawned");
237 }
238 spawned_objects.Insert(
ItemBase.Cast(
object));
239 object = null;
240 }
241 }
class GP5GasMask extends MaskBase ItemBase
string m_ItemsToCreate[MAXIMUM_RESULTS]
int m_ResultToInventory[MAXIMUM_RESULTS]
float m_ResultSpawnDistance[MAXIMUM_RESULTS]
int m_ResultInheritsColor[MAXIMUM_RESULTS]
void Error(string err)
Messagebox with error message.