Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define COR_AZUL 0x0055FFFF
- new NaoCarros[52] = {
- 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
- };
- new Carros[93] = {
- 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
- };
- forward ProxDetector(Float:radi, playerid, targetid);
- new NomeCarro[][] =
- {
- "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
- "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
- "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
- "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
- "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
- "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
- "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
- "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
- "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
- "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
- "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
- "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
- "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
- "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
- "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
- "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
- "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
- "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
- "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
- "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
- "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
- "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
- "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
- "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
- "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
- "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
- "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
- "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
- "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
- "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
- "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
- "Tiller", "Utility Trailer"
- };
- /*
- FUNÇÕES:
- =============================
- native GetVehicleName(playerid)
- native IsVehicleInCar(vehicleid)
- native IsVehicleInPlaneOrBike(vehicleid)
- native CreateGPS(playerid,Float:X,Float:Y,Float:Z)
- native IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
- native IsPlayerInLasVenturas(playerid)
- native IsPlayerInSanFierro(playerid)
- native IsPlayerInLosSantos(playerid)
- native IsPlayerInterior(playerid,InteriorID)
- native IsPlayerDying(playerid,DyingValue)
- native IsPlayerMinigun(playerid)
- native IsPlayerDriver(playerid)
- native IsPlayerPassager(playerid)
- native TeleportPlayer(playerid,CordX,CordY,CordZ)
- native IsUsingJatPack(playerid)
- native GivePlayerDrunkLevel(playerid,Drunk)
- native ProxDetector(Float:radi, playerid, targetid)
- native GivePlayerScore(playerid,ScoreQt)
- native IsPlayerUsingAirBreak(playerid)
- */
- stock GetVehicleName(playerid)
- {
- new string[256], i;
- format(string,sizeof(string),"Nome do Veiculo: %s",NomeCarro[GetVehicleModel(GetPlayerVehicleID(i))-400]);
- SendClientMessage(playerid, COR_AZUL, string);
- return 1;
- }
- //Os 2 seguintes: Creditos para DraKon
- stock IsVehicleInCar(vehicleid)
- {
- new RetValue = 0;
- if(GetVehicleModel(vehicleid) == Carros)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsVehicleInPlaneOrBike(vehicleid)
- {
- new RetValue = 0;
- if(GetVehicleModel(vehicleid) == NaoCarros)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
- {
- new RetValue = 0;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z );
- if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock CreateGPS(playerid,Float:X,Float:Y,Float:Z)
- {
- CreateCheckpoint(playerid,Float:X,Float:Y,Float:Z);
- }
- stock IsPlayerInLasVenturas(playerid)
- {
- new RetValue = 0;
- new Float:X,Float:Y;
- if(IsPlayerInPlace(2942.825,794.0955,2884.435,618.9274));
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerInSanFierro(playerid)
- {
- new RetValue = 0;
- new Float:X,Float:Y;
- if(IsPlayerInPlace(-1377.989,-2989.536,1599.869,-1004.297));
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerInLosSantos(playerid)
- {
- new RetValue = 0;
- new Float:X,Float:Y;
- if(IsPlayerInPlace(2884.435,175.1681,-887.5186,-2744.301));
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerInterior(playerid,InteriorID)
- {
- new RetValue = 0;
- if(GetPlayerInterior(playerid) == Interior ID);
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerDying(playerid,DyingValue)
- {
- new RetValue = 0;
- if(GetPlayerHealth(playerid) <= DyingValue)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerMinigun(playerid)
- {
- new RetValue = 0;
- if(GetPlayerWeapon(playerid) == 38)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerDriver(playerid)
- {
- new RetValue = 0;
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock IsPlayerPassager(playerid)
- {
- new RetValue = 0;
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock TeleportPlayer(playerid,CordX,CordY,CordZ)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid;
- SetVehiclePos(vehicleid,CordX,CordY,CordZ);
- }
- else if(!IsPlayerInAnyVehcile(playerid))
- {
- SetPlayerPos(playerid,CordX,CordY,CordZ);
- }
- return 1;
- }
- stock IsUsingJatPack(playerid)
- {
- new RetValue = 0;
- if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock GivePlayerDrunkLevel(playerid,Drunk)
- {
- SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid) + Drunk);
- }
- public ProxDetector(Float:radi, playerid, targetid)
- {
- if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- GetPlayerPos(targetid, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 1;
- }
- stock GivePlayerScore(playerid, ScoreQt)
- {
- SetPlayerScore(playerid, GetPlayerScore + ScoreQt);
- return 1;
- }
- stock IsPlayerUsingAirBreak(playerid)
- {
- new RetValue = 0;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- if(Z > 500 && !IsPlayerInAnyVehicle(playerid) && GetPlayerInterior(playerid) == 0)
- {
- RetValue = 1;
- }
- return RetValue;
- }
Advertisement
Add Comment
Please, Sign In to add comment