Advertisement
infiSTAR23

delete abandoned bikes

Apr 14th, 2014
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. if (isServer) then
  2. {
  3.     [] spawn {
  4.         while {1 == 1} do
  5.         {
  6.             sleep 600;
  7.             {
  8.                 _obj = _x;
  9.                 if (!isNull _obj) then
  10.                 {
  11.                     _characterID = _obj getVariable ['CharacterID','0'];
  12.                     if (_characterID == '0') then
  13.                     {
  14.                         _count = {isPlayer _x} count (_obj nearEntities 150);
  15.                         if (_count == 0) then
  16.                         {
  17.                             _objectID   = _obj getVariable['ObjectID','0'];
  18.                             _objectUID  = _obj getVariable['ObjectUID','0'];
  19.                             deleteVehicle _obj;
  20.                             [_objectID,_objectUID] call server_deleteObj;
  21.                         };
  22.                     };
  23.                 };
  24.             } forEach (Entities 'Old_bike_TK_INS_EP1');
  25.         };
  26.     };
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement