Guest User

Untitled

a guest
Nov 29th, 2010
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.93 KB | None | 0 0
  1. #define COR_AZUL 0x0055FFFF
  2.  
  3. new NaoCarros[52] = {
  4. 581 || 523 || 462 || 521 || 463 || 522 || 461 || 448 || 468 || 586 || 417 || 425 || 469 || 487 || 512 || 520 || 563 || 593 || 509 || 481 || 510 || 472 || 473 || 493 || 520 || 595 || 484 || 430 || 453 || 432 || 476 || 497 || 513 || 533 || 577 || 452 || 446 || 447 || 454 || 590 || 569 || 537 || 538 || 570 || 449 || 519 || 460 || 488 || 511 || 519 || 548 || 592
  5. };
  6.  
  7. new Carros[93] = {
  8. 400 || 401 || 402 || 404 || 405 || 410 || 411 || 412 || 415 || 418 || 419 || 420 || 421 || 422 || 424 || 426 || 429 || 434 || 436 || 438 || 439 || 442 || 445 || 451 || 458 || 466 || 467 || 470 || 474 || 475 || 477 || 478 || 480 || 480 || 480 || 480 || 489 || 490 || 491 || 492 || 494 || 496 || 500 || 501 || 502 || 503 || 504 || 505 || 506 || 507 || 516 || 517 || 518 || 526 || 527 || 529 || 533 || 534 || 535 || 536 || 540 || 541 || 542 || 543 || 545 || 546 || 547 || 549 || 550 || 551 || 555 || 558 || 559 || 560 || 561 || 562 || 565 || 566 || 567 || 575 || 576 || 580 || 585 || 587 || 589 || 596 || 597 || 598 || 600 || 602 || 603 || 604 || 605
  9. };
  10.  
  11. forward ProxDetector(Float:radi, playerid, targetid);
  12.  
  13. new NomeCarro[][] =
  14. {
  15. "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  16. "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  17. "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  18. "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  19. "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  20. "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  21. "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  22. "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  23. "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  24. "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  25. "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  26. "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  27. "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  28. "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  29. "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
  30. "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  31. "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  32. "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  33. "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  34. "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  35. "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  36. "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  37. "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  38. "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  39. "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  40. "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  41. "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  42. "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  43. "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  44. "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  45. "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  46. "Tiller", "Utility Trailer"
  47. };
  48.  
  49.  
  50.  
  51. /*
  52. FUNÇÕES:
  53. =============================
  54. native GetVehicleName(playerid)
  55. native IsVehicleInCar(vehicleid)
  56. native IsVehicleInPlaneOrBike(vehicleid)
  57. native CreateGPS(playerid,Float:X,Float:Y,Float:Z)
  58. native IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
  59. native IsPlayerInLasVenturas(playerid)
  60. native IsPlayerInSanFierro(playerid)
  61. native IsPlayerInLosSantos(playerid)
  62. native IsPlayerInterior(playerid,InteriorID)
  63. native IsPlayerDying(playerid,DyingValue)
  64. native IsPlayerMinigun(playerid)
  65. native IsPlayerDriver(playerid)
  66. native IsPlayerPassager(playerid)
  67. native TeleportPlayer(playerid,CordX,CordY,CordZ)
  68. native IsUsingJatPack(playerid)
  69. native GivePlayerDrunkLevel(playerid,Drunk)
  70. native ProxDetector(Float:radi, playerid, targetid)
  71. native GivePlayerScore(playerid,ScoreQt)
  72. native IsPlayerUsingAirBreak(playerid)
  73. */
  74.  
  75.  
  76.  
  77. stock GetVehicleName(playerid)
  78. {
  79. new string[256], i;
  80. format(string,sizeof(string),"Nome do Veiculo: %s",NomeCarro[GetVehicleModel(GetPlayerVehicleID(i))-400]);
  81. SendClientMessage(playerid, COR_AZUL, string);
  82. return 1;
  83. }
  84.  
  85. //Os 2 seguintes: Creditos para DraKon
  86.  
  87. stock IsVehicleInCar(vehicleid)
  88. {
  89. new RetValue = 0;
  90.  
  91. if(GetVehicleModel(vehicleid) == Carros)
  92. {
  93. RetValue = 1;
  94. }
  95. return RetValue;
  96. }
  97.  
  98. stock IsVehicleInPlaneOrBike(vehicleid)
  99. {
  100. new RetValue = 0;
  101.  
  102. if(GetVehicleModel(vehicleid) == NaoCarros)
  103. {
  104. RetValue = 1;
  105. }
  106. return RetValue;
  107. }
  108.  
  109.  
  110. stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
  111. {
  112. new RetValue = 0;
  113. new Float:X,Float:Y,Float:Z;
  114. GetPlayerPos(playerid,X,Y,Z );
  115.  
  116. if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
  117. {
  118. RetValue = 1;
  119. }
  120. return RetValue;
  121. }
  122.  
  123. stock CreateGPS(playerid,Float:X,Float:Y,Float:Z)
  124. {
  125. CreateCheckpoint(playerid,Float:X,Float:Y,Float:Z);
  126. }
  127.  
  128.  
  129. stock IsPlayerInLasVenturas(playerid)
  130. {
  131. new RetValue = 0;
  132. new Float:X,Float:Y;
  133. if(IsPlayerInPlace(2942.825,794.0955,2884.435,618.9274));
  134. {
  135. RetValue = 1;
  136. }
  137. return RetValue;
  138. }
  139.  
  140.  
  141. stock IsPlayerInSanFierro(playerid)
  142. {
  143. new RetValue = 0;
  144. new Float:X,Float:Y;
  145. if(IsPlayerInPlace(-1377.989,-2989.536,1599.869,-1004.297));
  146. {
  147. RetValue = 1;
  148. }
  149. return RetValue;
  150. }
  151.  
  152.  
  153. stock IsPlayerInLosSantos(playerid)
  154. {
  155. new RetValue = 0;
  156. new Float:X,Float:Y;
  157. if(IsPlayerInPlace(2884.435,175.1681,-887.5186,-2744.301));
  158. {
  159. RetValue = 1;
  160. }
  161. return RetValue;
  162. }
  163.  
  164. stock IsPlayerInterior(playerid,InteriorID)
  165. {
  166. new RetValue = 0;
  167. if(GetPlayerInterior(playerid) == Interior ID);
  168. {
  169. RetValue = 1;
  170. }
  171. return RetValue;
  172. }
  173.  
  174. stock IsPlayerDying(playerid,DyingValue)
  175. {
  176. new RetValue = 0;
  177. if(GetPlayerHealth(playerid) <= DyingValue)
  178. {
  179. RetValue = 1;
  180. }
  181. return RetValue;
  182. }
  183.  
  184. stock IsPlayerMinigun(playerid)
  185. {
  186. new RetValue = 0;
  187. if(GetPlayerWeapon(playerid) == 38)
  188. {
  189. RetValue = 1;
  190. }
  191. return RetValue;
  192. }
  193.  
  194. stock IsPlayerDriver(playerid)
  195. {
  196. new RetValue = 0;
  197. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  198. {
  199. RetValue = 1;
  200. }
  201. return RetValue;
  202. }
  203.  
  204.  
  205. stock IsPlayerPassager(playerid)
  206. {
  207. new RetValue = 0;
  208. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  209. {
  210. RetValue = 1;
  211. }
  212. return RetValue;
  213. }
  214.  
  215. stock TeleportPlayer(playerid,CordX,CordY,CordZ)
  216. {
  217. if(IsPlayerInAnyVehicle(playerid))
  218. {
  219. new vehicleid;
  220. SetVehiclePos(vehicleid,CordX,CordY,CordZ);
  221. }
  222. else if(!IsPlayerInAnyVehcile(playerid))
  223. {
  224. SetPlayerPos(playerid,CordX,CordY,CordZ);
  225. }
  226. return 1;
  227. }
  228.  
  229.  
  230. stock IsUsingJatPack(playerid)
  231. {
  232. new RetValue = 0;
  233. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
  234. {
  235. RetValue = 1;
  236. }
  237. return RetValue;
  238. }
  239.  
  240. stock GivePlayerDrunkLevel(playerid,Drunk)
  241. {
  242. SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid) + Drunk);
  243. }
  244.  
  245.  
  246. public ProxDetector(Float:radi, playerid, targetid)
  247. {
  248. if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  249. {
  250. new Float:posx, Float:posy, Float:posz;
  251. new Float:oldposx, Float:oldposy, Float:oldposz;
  252. new Float:tempposx, Float:tempposy, Float:tempposz;
  253. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  254. GetPlayerPos(targetid, posx, posy, posz);
  255. tempposx = (oldposx -posx);
  256. tempposy = (oldposy -posy);
  257. tempposz = (oldposz -posz);
  258. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  259. {
  260. return 1;
  261. }
  262. }
  263. return 1;
  264. }
  265.  
  266.  
  267. stock GivePlayerScore(playerid, ScoreQt)
  268. {
  269. SetPlayerScore(playerid, GetPlayerScore + ScoreQt);
  270. return 1;
  271. }
  272.  
  273. stock IsPlayerUsingAirBreak(playerid)
  274. {
  275. new RetValue = 0;
  276. new Float:X,Float:Y,Float:Z;
  277. GetPlayerPos(playerid,X,Y,Z);
  278. if(Z > 500 && !IsPlayerInAnyVehicle(playerid) && GetPlayerInterior(playerid) == 0)
  279. {
  280. RetValue = 1;
  281. }
  282. return RetValue;
  283. }
Advertisement
Add Comment
Please, Sign In to add comment