Advertisement
Guest User

Untitled

a guest
May 17th, 2016
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.00 KB | None | 0 0
  1. stock SavePlayer(playerid) // ulogovan provera ima - bespotrebno jer vrsi u komandi vec
  2.  
  3.  
  4. stock VoziloJeAvion(id)
  5. {
  6. if(id == 592 || id == 577 || id == 511 || id == 512 || id == 593 || id == 520 || id == 553 || id == 476 || id == 519 || id == 460 || id == 513) return 1;
  7. else if(id == 548 || id == 425 || id == 417 || id == 487 || id == 488 || id == 497 || id == 563 || id == 447 || id == 469) return 1;
  8. else return 0;
  9. }
  10. ///////////////////////////////////////////////////////////////////////////
  11. stock VoziloJeBrod(id)
  12. {
  13. if(id == 472 || id == 473 || id == 493 || id == 484 || id == 430 || id == 454 || id == 453 || id == 452 || id == 446) return 1;
  14. return 0;
  15. }
  16. ///////////////////////////////////////////////////////////////////////////
  17. stock VoziloJeMotor(id)
  18. {
  19. if(id == 462 || id == 448 || id == 581 || id == 522 || id == 461 || id == 521 || id == 523 || id == 463 || id == 468 || id == 471) return 1;
  20. return 0;
  21. }
  22. ///////////////////////////////////////////////////////////////////////////
  23. stock VoziloJeBicikla(id)
  24. {
  25. if(id == 481 || id == 509 || id == 510) return 1;
  26. return 0;
  27. }
  28. ///////////////////////////////////////////////////////////////////////////
  29. stock VoziloJeKamion(id)
  30. {
  31. if(id == 499 || id == 498 || id == 609 || id == 524 || id == 578 || id == 455 || id == 403 || id == 414 || id == 443 || id == 514 || id == 515 || id == 408 || id == 431 || id == 437 || id == 538) return 1;
  32. return 0;
  33. }
  34.  
  35. //ZASTO KORISTITI STOCK KAD MOZEMO MODELID U KOMANDI VEC?
  36.  
  37. stock BelaBojaIgraca(playerid)
  38. {
  39. SetPlayerColor(playerid,0xFFFFFF00);
  40. }
  41.  
  42. //to je bespotrebno mozemo odma 0xFFFFFFFF u komandi
  43.  
  44. stock SCMF(playerid,color,fstring[],{Float, _}:...)
  45. {
  46. new n=(numargs()-3)*4;
  47. if(n)
  48. {
  49. new message[128],arg_start,arg_end;
  50. #emit CONST.alt fstring
  51. #emit LCTRL 5
  52. #emit ADD
  53. #emit STOR.S.pri arg_start
  54. #emit LOAD.S.alt n
  55. #emit ADD
  56. #emit STOR.S.pri arg_end
  57. do
  58. {
  59. #emit LOAD.I
  60. #emit PUSH.pri
  61. arg_end-=4;
  62. #emit LOAD.S.pri arg_end
  63. }
  64. while(arg_end>arg_start);
  65. #emit PUSH.S fstring
  66. #emit PUSH.C 255
  67. #emit PUSH.ADR message
  68. n+=4*3;
  69. #emit PUSH.S n
  70. #emit SYSREQ.C format
  71. n+=4;
  72. #emit LCTRL 4
  73. #emit LOAD.S.alt n
  74. #emit ADD
  75. #emit SCTRL 4
  76. return SCM(playerid,color,message);
  77. }
  78. else return SCM(playerid,color,fstring);
  79. }
  80.  
  81. //otisao u kurac
  82.  
  83. forward AntiAFK();
  84. public AntiAFK()
  85. {
  86. foreach(Player, i)
  87. {
  88. if(IsPlayerConnected(i))
  89. {
  90. if(!IsPlayerNPC(i) && PlayerInfo[i][pAdmin] < 6)
  91. {
  92. GetPlayerPos(i, PlayerPos[i][0], PlayerPos[i][1], PlayerPos[i][2]);
  93. if(PlayerPos[i][0] == PlayerPos[i][3] && PlayerPos[i][1] == PlayerPos[i][4] && PlayerPos[i][2] == PlayerPos[i][5])
  94. {
  95. new string[100];
  96. format(string,sizeof(string), "[UP:RP] "CRVENA"%s je kikovan sa servera zbog afk-a!", GetName(i));
  97. AdminGameMaster(-1, string);
  98. SCM(i, -1, "[UP:RP] "CRVENA"Kikovani ste jer ste bili afk duze od 10 min!");
  99. Kick(i);
  100. }
  101. PlayerPos[i][3] = PlayerPos[i][0];
  102. PlayerPos[i][4] = PlayerPos[i][1];
  103. PlayerPos[i][5] = PlayerPos[i][2];
  104. }
  105. }
  106. }
  107. }
  108.  
  109. //ovo nitko vise ne koristi na balkanu zasto koristit npr /* */ umjesto sve izbrisat funkcije vezane uz to?
  110.  
  111. forward LoginP(playerid);
  112. public LoginP(playerid)
  113. {
  114. OcistiChat(playerid,16); TextDrawShowForPlayer(playerid, LoginTextdraw[0]);
  115. TextDrawShowForPlayer(playerid, LoginTextdraw[1]); TextDrawShowForPlayer(playerid, LoginTextdraw[2]);
  116. InterpolateCameraPos(playerid, 1164.730102, -1187.794677, 307.139495, 1565.853759, -1567.488525, 307.139495, 30000);
  117. InterpolateCameraLookAt(playerid, 1169.372436, -1187.942382, 305.288421, 1565.404052, -1562.916870, 305.165283, 30000);
  118. LogRegTimer[playerid] = SetTimerEx("LogReg",8000, true, "d", playerid);
  119. return 1;
  120. }
  121.  
  122. //zasto ocistichat(playerid, 16); ako netko koristi pagesize i takodje koristi se vec ciscenje na loginu i regu,tako da je ovo bespotrebno
  123.  
  124. forward DrogaEfekat(playerid);
  125. public DrogaEfekat(playerid)
  126. {
  127. SetPlayerWeather(playerid, 10); ClearAnimations(playerid); KoristiDrogu[playerid] = 0;
  128. GameTextForPlayer(playerid,"~w~Efekat droge prosao...", 5000, 3);
  129. return 1;
  130. }
  131.  
  132. //timer na 5000 ? o boze
  133.  
  134. forward SendGMMessage(color, string[]);
  135. public SendGMMessage(color, string[])
  136. {
  137. foreach(Player,i)
  138. {
  139. if(PlayerInfo[i][pGM] >= 1)
  140. {
  141. SendClientMessage(i, color, string);
  142. }
  143. }
  144. }
  145.  
  146. //hmmm ovo se koristi u svakoj funkciji sigurno -.-
  147.  
  148. forward SendAdminMessage(color, string[]);
  149. public SendAdminMessage(color, string[])
  150. {
  151. foreach(Player,i)
  152. {
  153. if(PlayerInfo[i][pAdmin] >= 1)
  154. {
  155. SendClientMessage(i, color, string);
  156. }
  157. }
  158. }
  159.  
  160. //hmm i ovo se koristi 100%
  161.  
  162. forward CenaRazgovora(playerid);
  163. public CenaRazgovora(playerid)
  164. {
  165. if(PlayerInfo[playerid][pMobKredit] > 0)
  166. {
  167. PlayerInfo[playerid][pMobKredit]--;
  168. SavePlayer(playerid);
  169. }
  170. else
  171. {
  172. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE );
  173. RemovePlayerAttachedObject(playerid, TELEFON_SLOT);
  174. SetPlayerSpecialAction(TelefonRazgovor[playerid], SPECIAL_ACTION_STOPUSECELLPHONE);
  175. RemovePlayerAttachedObject(TelefonRazgovor[playerid], TELEFON_SLOT);
  176. TelefonRazgovor[TelefonRazgovor[playerid]] = -1; TelefonRazgovor[playerid] = -1;
  177. KillTimer(MobilniCenaRazgovora[playerid]);
  178. return 1;
  179. }
  180. return 1;
  181. }
  182.  
  183. //koliko znam,ovo ne skida pare.. + testirano
  184.  
  185. forward UcitajPodesavanja(name[],value[]);
  186. public UcitajPodesavanja(name[],value[])
  187. {
  188. INI_Int("Registracija",ServerInfo[isRegistracija]);
  189. INI_Int("Oglas",ServerInfo[isOglas]);
  190. INI_Int("Pitanja",ServerInfo[isPitanja]);
  191. INI_Int("Report",ServerInfo[isReport]);
  192. return 1;
  193. }
  194.  
  195. // fali vam smsoglas ukoliko koristite i u scriptfiles>server imate chat koji se ovde ne koristi to dokazuje da ovo nije pravi mod i izbrisite to chat!
  196.  
  197. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  198. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  199. {
  200. if(IsPlayerConnected(playerid))
  201. {
  202. new Float:posx, Float:posy, Float:posz;
  203. new Float:oldposx, Float:oldposy, Float:oldposz;
  204. new Float:tempposx, Float:tempposy, Float:tempposz;
  205. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  206. foreach(Player,i)
  207. {
  208. if(IsPlayerConnected(i))
  209. {
  210. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  211. {
  212. GetPlayerPos(i, posx, posy, posz);
  213. tempposx = (oldposx -posx);
  214. tempposy = (oldposy -posy);
  215. tempposz = (oldposz -posz);
  216. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  217. {
  218. SendClientMessage(i, col1, string);
  219. }
  220. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  221. {
  222. SendClientMessage(i, col2, string);
  223. }
  224. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  225. {
  226. SendClientMessage(i, col3, string);
  227. }
  228. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  229. {
  230. SendClientMessage(i, col4, string);
  231. }
  232. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  233. {
  234. SendClientMessage(i, col5, string);
  235. }
  236. } }
  237. }
  238. }
  239. return 1;
  240. }
  241.  
  242. //te je zastario ima noviji te ima bespotrebnu proveru je li igrac konektovan
  243.  
  244. i ima ono g_resetuj i to koji mozete stavit na svoj AC za proveru i to... :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement