Advertisement
Guest User

OtherTime GM

a guest
Nov 16th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.45 KB | None | 0 0
  1. public OtherTimer()
  2. {
  3.     new string[256];
  4.     foreach (new i : Player)
  5.     {
  6.         if(SafeTime[i] > 0)
  7.         {
  8.             SafeTime[i]--;
  9.         }
  10.         if(SafeTime[i] == 1)
  11.         {
  12.             if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
  13.             {
  14.                 new loginname[164];
  15.                 new loginstring[MAX_STRING];
  16.                 GetPlayerName(i,loginname,164);
  17.                 format(loginstring,sizeof(loginstring),"{FFFFFF}Bun venit, {4196FF}%s{FFFFFF}.\n{FFFFFF}Introdu parola in casuta de mai jos pentru a te autentifica:\n{FFFFFF}Ultima autentificare: {4196FF}%s{FFFFFF}.",loginname,PlayerInfo[i][pUltLog]);
  18.                 ShowPlayerDialog(i,12346,DIALOG_STYLE_PASSWORD," {FFFFFF}Conectare",loginstring,"Intra","Iesi");
  19.             }
  20.         }
  21.         if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
  22.         {
  23.             new house = PlayerInfo[i][pLocal];
  24.             new Float:oldposx, Float:oldposy, Float:oldposz;
  25.             GetPlayerPos(i, oldposx, oldposy, oldposz);
  26.             if(oldposz != 0.0)
  27.             {
  28.                 if(oldposz < 600.0)
  29.                 {
  30.                     if(house == 241)//City Hall
  31.                     {
  32.                         SetPlayerInterior(i,0);
  33.                         SetPlayerPos(i,1481.0463,-1770.3093,18.7958);
  34.                         PlayerInfo[i][pInt] = 0;
  35.                         PlayerInfo[i][pLocal] = 255;
  36.                     }
  37.                     if(house == 242)
  38.                     {
  39.                         SetPlayerInterior(i,0);
  40.                         SetPlayerPos(i,1073.0619,-344.5148,73.9922);
  41.                         PlayerInfo[i][pInt] = 0;
  42.                         PlayerInfo[i][pLocal] = 255;
  43.                     }
  44.                     if(house >= 99 && house != 10000)
  45.                     {
  46.                         SetPlayerPos(i, BizzInfo[house-99][bEntranceX], BizzInfo[house-99][bEntranceY],BizzInfo[house-99][bEntranceZ]); // Warp the player
  47.                         PlayerInfo[i][pLocal] = 255;
  48.                         SetPlayerInterior(i,0);
  49.                         PlayerInfo[i][pInt] = 0;
  50.                         SetPlayerVirtualWorld(i, 0);
  51.                     }
  52.                 }
  53.             }
  54.         }
  55.         new Float:Vitezad = GetVehicleSpeed_P(i);
  56.         if(RadarON[i] == 1 && Vitezad > 5)
  57.         {
  58.                 format(string, sizeof(string), "** Politistul %s a renuntat la radar **", GetPlayerNameEx(i));
  59.                 SendRadioMessage(1, COLOR_DBLUE, string);
  60.                 RadarON[i] = 0;
  61.         }
  62.         if(CellTime[i] > 0)
  63.         {
  64.             if (CellTime[i] == cchargetime)
  65.             {
  66.                 CellTime[i] = 1;
  67.                 if(Mobile[Mobile[i]] == i)
  68.                 {
  69.                     CallCost[i] = CallCost[i]+SBizzInfo[1][sbEntranceCost]/2;
  70.                 }
  71.             }
  72.             CellTime[i] = CellTime[i] +1;
  73.             if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
  74.             {
  75.                 if(IsPlayerConnected(Mobile[i]))
  76.                 {
  77.                     new called[MAX_PLAYER_NAME];
  78.                     GetPlayerName(Mobile[i], called, sizeof(called));
  79.                     format(string, sizeof(string), "* Telefonul lui %s suna.", called);
  80.                     RingTone[Mobile[i]] = 10;
  81.                     ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  82.                 }
  83.             }
  84.         }
  85.         if(CellTime[i] == 0 && CallCost[i] > 0)
  86.         {
  87.             format(string, sizeof(string), "~w~Apelul a costat~n~~r~$%d",CallCost[i]);
  88.             GivePlayerCash(i, -CallCost[i]);
  89.             SBizzInfo[1][sbTill] += CallCost[i];
  90.             ExtortionSBiz(1, CallCost[i]);
  91.             GameTextForPlayer(i, string, 5000, 1);
  92.             CallCost[i] = 0;
  93.         }
  94.         if(TransportTime[i] > 0)
  95.         {//Taxi driver and passenger only
  96.             if(TransportTime[i] >= 16)
  97.             {
  98.                 TransportTime[i] = 1;
  99.                 if(TransportDriver[i] < 999)
  100.                 {
  101.                     if(IsPlayerConnected(TransportDriver[i]))
  102.                     {
  103.                         TransportCost[i] += TransportValue[TransportDriver[i]];
  104.                         TransportCost[TransportDriver[i]] = TransportCost[i];
  105.                     }
  106.                 }
  107.             }
  108.             TransportTime[i] += 1;
  109.             format(string, sizeof(string), "~r~%d ~w~: ~g~$%d",TransportTime[i],TransportCost[i]);
  110.             GameTextForPlayer(i, string, 15000, 6);
  111.         }
  112.     }
  113.     return 1;
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement