Guest User

Untitled

a guest
Jan 11th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.58 KB | None | 0 0
  1. public OtherTimer()
  2. {
  3. new string[256];
  4. new Float:oldposx, Float:oldposy, Float:oldposz;
  5. for(new i = 0; i < MAX_PLAYERS; i++)
  6. {
  7. if(IsPlayerConnected(i))
  8. {
  9. if(SafeTime[i] > 0)
  10. {
  11. SafeTime[i]--;
  12. }
  13. if(SafeTime[i] == 1)
  14. {
  15. if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
  16. {
  17. new loginstring[128];
  18. new loginname[64];
  19. GetPlayerName(i,loginname,64);
  20. format(loginstring, 128, "{FFFFFF}Salut {F65205}%s {FFFFFF}si Bine Ai Venit\n{FFFFFF}Statistici: {E60000}Cont Inregistrat\n" , loginname);
  21. ShowPlayerDialog(i, 12346,DIALOG_STYLE_INPUT,"Logare eXtream.Ro",loginstring,"Logare","Iesire");
  22. }
  23. }
  24. if(GetPlayerState(i) == 2)
  25. {
  26. GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
  27. if(TelePos[i][5] > 550.0)
  28. {
  29. TelePos[i][0] = 0.0;
  30. TelePos[i][1] = 0.0;
  31. }
  32. if(TelePos[i][0] != 0.0)
  33. {
  34. new Float:xdist = TelePos[i][3]-TelePos[i][0];
  35. new Float:ydist = TelePos[i][4]-TelePos[i][1];
  36. new Float:sqxdist = xdist*xdist;
  37. new Float:sqydist = ydist*ydist;
  38. new Float:distance = (sqxdist+sqydist)/31;
  39. if(gSpeedo[i] == 2)
  40. {
  41. if(distance > 500)
  42. {
  43. format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
  44. }
  45. GameTextForPlayer(i, string, 2000, 5);
  46. }
  47. }
  48. if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
  49. {
  50. TelePos[i][0] = TelePos[i][3];
  51. TelePos[i][1] = TelePos[i][4];
  52. }
  53. }
  54. if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
  55. {
  56. new house = PlayerInfo[i][pLocal];
  57. GetPlayerPos(i, oldposx, oldposy, oldposz);
  58. if(oldposz != 0.0)
  59. {
  60. if(oldposz < 600.0)
  61. {
  62. if(house > 10000)
  63. {
  64. new tmpcar = GetPlayerVehicleID(i);
  65. if (!PlayerToPoint(6, i,1040.6,-1021.0,31.7) && house == 10001 ||!PlayerToPoint(6, i,-2720.5,217.5,4.1) && house == 10002 ||!PlayerToPoint(6, i,2644.6,-2044.9,13.3) && house == 10003)
  66. {
  67. if (GetPlayerState(i) == 2)
  68. {
  69. SetVehiclePos(tmpcar, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
  70. SetVehicleZAngle(tmpcar, HouseCarSpawns[tmpcar-1][3]);
  71. }
  72. else
  73. {
  74. SetPlayerPos(i, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
  75. }
  76. new oldcash = gSpentCash[i];
  77. new Total = GetPlayerMoney(i) - oldcash;
  78. printf("Total %d = GetPlayerMoney(playerid) %d - oldcash %d",Total,GetPlayerMoney(i),oldcash);
  79. new name[MAX_PLAYER_NAME];
  80. GetPlayerName(i, name, sizeof(name));
  81. format(string,128,"<< %s a parasit homemodshop cu %d lei >>",name,Total);
  82. PayLog(string);
  83. gSpentCash[i] = 0;
  84. TelePos[i][0] = 0.0;
  85. TelePos[i][1] = 0.0;
  86. PlayerInfo[i][pLocal] = 255;
  87. SetPlayerInterior(i,0);
  88. PlayerInfo[i][pInt] = 0;
  89. Spectate[i] = 255;
  90. }
  91. }
  92. if(house == 241)//City Hall
  93. {
  94. SetPlayerInterior(i,0);
  95. SetPlayerPos(i,-2162.2554,-2385.9541,30.6250);
  96. PlayerInfo[i][pInt] = 0;
  97. PlayerInfo[i][pLocal] = 255;
  98. }
  99. if(house == 242)
  100. {
  101. SetPlayerInterior(i,0);
  102. SetPlayerPos(i,1073.0619,-344.5148,73.9922);
  103. PlayerInfo[i][pInt] = 0;
  104. PlayerInfo[i][pLocal] = 255;
  105. }
  106. if(house >= 99 && house != 10000)
  107. {
  108. SetPlayerPos(i, BizzInfo[house-99][bEntranceX], BizzInfo[house-99][bEntranceY],BizzInfo[house-99][bEntranceZ]); // Warp the player
  109. PlayerInfo[i][pLocal] = 255;
  110. SetPlayerInterior(i,0);
  111. PlayerInfo[i][pInt] = 0;
  112. }
  113. else if(house < 99 && house != 10000)
  114. {
  115. SetPlayerPos(i, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]); // Warp the player
  116. PlayerInfo[i][pLocal] = 255;
  117. SetPlayerInterior(i,0);
  118. PlayerInfo[i][pInt] = 0;
  119. }
  120. }
  121. }
  122. }
  123. if(CellTime[i] > 0)
  124. {
  125. if (CellTime[i] == cchargetime)
  126. {
  127. CellTime[i] = 1;
  128. if(Mobile[Mobile[i]] == i)
  129. {
  130. CallCost[i] = CallCost[i]+callcost;
  131. }
  132. }
  133. CellTime[i] = CellTime[i] +1;
  134. if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
  135. {
  136. if(IsPlayerConnected(Mobile[i]))
  137. {
  138. new called[MAX_PLAYER_NAME];
  139. GetPlayerName(Mobile[i], called, sizeof(called));
  140. format(string, sizeof(string), "* %s's suna telefonul.", called);
  141. RingTone[Mobile[i]] = 10;
  142. ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  143. }
  144. }
  145. }
  146. if(CellTime[i] == 0 && CallCost[i] > 0)
  147. {
  148. format(string, sizeof(string), "~w~Apelul a costat~n~~r~ %d lei",CallCost[i]);
  149. GivePlayerMoney(i, -CallCost[i]);
  150. SBizzInfo[2][sbTill] += CallCost[i];
  151. ExtortionSBiz(2, CallCost[i]);
  152. GameTextForPlayer(i, string, 5000, 1);
  153. CallCost[i] = 0;
  154. }
  155. if(TransportTime[i] > 0)
  156. {//Taxi driver and passenger only
  157. if(TransportTime[i] >= 16)
  158. {
  159. TransportTime[i] = 1;
  160. if(TransportDriver[i] < 999)
  161. {
  162. if(IsPlayerConnected(TransportDriver[i]))
  163. {
  164. TransportCost[i] += TransportValue[TransportDriver[i]];
  165. TransportCost[TransportDriver[i]] = TransportCost[i];
  166. }
  167. }
  168. }
  169. TransportTime[i] += 1;
  170. format(string, sizeof(string), "~r~%d ~w~: ~g~ %d lei",TransportTime[i],TransportCost[i]);
  171. GameTextForPlayer(i, string, 15000, 6);
  172. }
  173. }
  174. }
  175. return 1;
  176. }
Advertisement
Add Comment
Please, Sign In to add comment