Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.45 KB | None | 0 0
  1. //Varijabla
  2. new CamperDInt[MAX_PLAYERS];
  3. //Pod OnPlayerDeath i OnPlayerConnect
  4. CamperDInt[playerid] = 0;
  5. //Pod onplayerdisconnect
  6. for(new i = 0; i < MAX_PLAYERS; i++) {
  7.     if(CamperID[i] == owncamp[playerid] && IsValidVehicle(owncamp[playerid]) && CamperDInt[i] == 0) {
  8.         SendClientMessage(i, COLOR_GRAY, "Vlasnik kampera je upravo izasao sa servera, pri izlasku cete biti prebaceni na poziciju s ulaska.");
  9.         CamperDInt[i] = 1;
  10.     }
  11. }
  12.  
  13. //Komanda
  14. dcmd_kizlaz(playerid, params[])
  15. {
  16.     #pragma unused params
  17.     if(CamperID[playerid] > 0)
  18.     {
  19.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 768.0327,1402.8625,-4.5741))
  20.         {
  21.             if(VoziloKamper(CamperID[playerid]) && IsValidVehicle(CamperID[playerid]) && CamperDInt[playerid] == 0)
  22.             {
  23.                 new Float:vpos[3];
  24.                 GepekVozila(CamperID[playerid], vpos[0], vpos[1], vpos[2]);
  25.                 AC_SetPlayerPos(playerid, vpos[0], vpos[1], vpos[2]);
  26.                 SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(CamperID[playerid]));
  27.                 SetPlayerInterior(playerid, 0);
  28.                 CamperID[playerid] = 0;
  29.             }
  30.             else
  31.             {
  32.                 AC_SetPlayerPos(playerid, CamperPos[playerid][0], CamperPos[playerid][1], CamperPos[playerid][2]);
  33.                 SetPlayerVirtualWorld(playerid, 0);
  34.                 CamperID[playerid] = 0;
  35.                 CamperDInt[playerid] = 0;
  36.             }
  37.         }
  38.     }
  39.     return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement