Advertisement
Dayrion

Untitled

Apr 6th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.85 KB | None | 0 0
  1. interiorSpawn1(interiorID, player1, player2 = -1)
  2. {
  3.     if(player2 > -1)
  4.     {
  5.         new sWorld, aWorld, sInterior, aInterior;
  6.         sWorld = GetPlayerVirtualWorld(player2);
  7.         aWorld = GetPlayerVirtualWorld(player1);
  8.         sInterior = GetPlayerInterior(player2);
  9.         aInterior = GetPlayerInterior(player1);
  10.         if(sWorld > 0 || aWorld > 0)
  11.         {
  12.             SetPlayerVirtualWorld(player2, 0);
  13.             SetPlayerVirtualWorld(player1, 0);
  14.         }
  15.         if(sInterior && aInterior != 0)
  16.         {
  17.             SetPlayerInterior(player1, interiorID);
  18.             SetPlayerInterior(player2, interiorID);
  19.         }
  20.         return 1;
  21.     }
  22.     else
  23.     {
  24.         new sWorld, sInterior;
  25.         sWorld = GetPlayerVirtualWorld(player1);
  26.         sInterior = GetPlayerInterior(player1);
  27.         if(sWorld > 0)
  28.         {
  29.             SetPlayerVirtualWorld(player1, 0);
  30.         }
  31.         if(sInterior != 0)
  32.         {
  33.             SetPlayerInterior(player1, interiorID);
  34.         }
  35.         return 1;
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement