Advertisement
LeLeTe

GM Básico de RP

Feb 14th, 2014
4,104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 239.45 KB | None | 0 0
  1. #include                    <a_samp>
  2. #include                    <YSI\y_ini>
  3. #include                    <sscanf2>
  4. #include                    <zcmd>
  5. #include                    <foreach>
  6. #include                    <streamer>
  7.  
  8. #pragma                     tabsize                         (0)
  9.  
  10. #undef                      MAX_PLAYERS
  11. //#define                     DEBUG                    
  12. #define                     SCRIPT_VERSION                  "1.3"
  13. #define                     MAX_PLAYERS                     (50)
  14. #define                     MAX_HOUSES                      (500)
  15. #define                     MAX_BUILDINGS                   (500)
  16. #define                     MAX_FACTIONS                    (15)
  17. #define                     maxobj                          (500)
  18. #define                     COLOR_FADE1                     0xE6E6E6FF
  19. #define                     COLOR_OOC                       0xB1C8FBAA
  20. #define                     COLOR_GRAD1                     0xB4B5B7FF
  21. #define                     COLOR_GRAD2                     0xBFC0C2FF
  22. #define                     COLOR_GRAD3                     0xCBCCCEFF
  23. #define                     COLOR_GRAD4                     0xD8D8D8FF
  24. #define                     COLOR_GRAD5                     0xE3E3E3FF
  25. #define                     COLOR_GRAD6                     0xF0F0F0FF
  26. #define                     COLOR_GREY                      0xAFAFAFFF
  27. #define                     COLOR_GREEN                     0x9EC73DFF
  28. #define                     COLOR_RED                       0xAA3333FF
  29. #define                     COLOR_LIGHTRED                  0xFF6347FF
  30. #define                     COLOR_LIGHTBLUE                 0x33CCFFFF
  31. #define                     COLOR_LIGHTGREEN                0x9ACD32FF
  32. #define                     COLOR_YELLOW                    0xDABB3EFF
  33. #define                     COLOR_WHITE                     0xFFFFFFFF
  34. #define                     COLOR_PURPLE                    0xC2A2DAFF
  35. #define                     COLOR_DBLUE                     0x2641FEFF
  36. #define                     COLOR_ALLDEPT                   0xFF8282FF
  37. #define                     COLOR_BLUE                      0x2641FEFF
  38. #define                     COLOR_DARKNICERED               0x9D000096
  39. #define                     COLOR_ORANGE                    0xFF9900FF
  40. #define                     COLOR_MAGENTA                   0xFF00FFFF
  41. #define                     COLOR_NAVY                      0x000080FF
  42. #define                     COLOR_AQUA                      0xF0F8FFFF
  43. #define                     COLOR_CRIMSON                   0xDC143CFF
  44. #define                     COLOR_FLBLUE                    0x6495EDFF
  45. #define                     COLOR_BISQUE                    0xFFE4C4FF
  46. #define                     COLOR_BLACK2                    0x000000FF
  47. #define                     COLOR_CHARTREUSE                0x7FFF00FF
  48. #define                     COLOR_BROWN                     0xA52A2AFF
  49. #define                     COLOR_CORAL                     0xFF7F50FF
  50. #define                     COLOR_GOLD                      0xB8860BFF
  51. #define                     COLOR_GREENYELLOW               0xADFF2FFF
  52. #define                     COLOR_INDIGO                    0x4B00B0FF
  53. #define                     COLOR_IVORY                     0xFFFF82FF
  54. #define                     COLOR_LAWNGREEN                 0x7CFC00FF
  55. #define                     COLOR_SYSTEMGREEN               0x32CD32FF
  56. #define                     COLOR_MIDNIGHTBLUE              0x191970FF
  57. #define                     COLOR_MAROON                    0x800000FF
  58. #define                     COLOR_OLIVE                     0x808000FF
  59. #define                     COLOR_ORANGERED                 0xFF4500FF
  60. #define                     COLOR_PINK                      0xFFC0CBFF
  61. #define                     COLOR_SPRINGGREEN               0x00FF7FFF
  62. #define                     COLOR_TOMATO                    0xFF6347FF
  63. #define                     COLOR_YELLOWGREEN               0x9ACD32FF
  64. #define                     COLOR_MEDIUMAQUA                0x83BFBFFF
  65. #define                     COLOR_MEDIUMMAGENTA             0x8B008BFF
  66. #define                     COLOR_BRIGHTRED                 0xDC143CFF
  67. #define                     COLOR_SYSTEM                    0xA9C4E4FF
  68. #define                     COLOR_WARNING                   COLOR_YELLOW
  69. #define                     COLOR_ERROR                     COLOR_BRIGHTRED
  70. #define                     COLOR_SAMP                      0xA9C4E4FF
  71. #define                     COLOR_FAMILY                    0x7BDDA5FF
  72. #define                     DIALOG_LOGIN                    (0)
  73. #define                     DIALOG_CREATION                 (1)
  74. #define                     DIALOG_PLAYERDESCRIPTION        (14)
  75. #define                     DIALOG_X                        (21)
  76.  
  77. //==============================[FORWARD FUNCTIONS]=============================
  78.  
  79. forward CheckForWalkingTeleport(playerid);
  80. forward OnPlayerLoginEx(playerid, name[], value[]);
  81. forward OnPlayerUpdateEx(playerid);
  82. forward OnPlayerRegister(playerid, pass[]);
  83. forward GlobalPlayerLoop();
  84. forward GameModeExitFunc();
  85.  
  86. //==============================[GLOBAL VARIABLES]==============================
  87.  
  88. new Float:ObjCoords[maxobj][3];
  89. new object[maxobj];
  90. new Dropped[maxobj];
  91. new ObjectID[maxobj][3];
  92. new _string[128];
  93. new _largestring[1280];
  94. new _playername[24];
  95. new _otherplayername[24];
  96. new GMXSet;
  97. new ghour, gmin, gsec;
  98. new gOOC;
  99. new gametime;
  100. new timeshift = -1;
  101. new shifthour;
  102. //new Text3D:CarDescription[MAX_VEHICLES];
  103. //new Text3D:CarMusic[MAX_VEHICLES];
  104. new Text3D:PlayerDescription[MAX_PLAYERS];
  105. new Text3D:BuildingLabel[MAX_BUILDINGS];
  106. new BuildingPickUp[MAX_BUILDINGS];
  107. new CreatedCar[MAX_VEHICLES];
  108.  
  109. new GunNames[48][] = {
  110.     "Nada",
  111.     "Soco Inglês",
  112.     "Taco de Golfe",
  113.     "Cacetete",
  114.     "Faca",
  115.     "Taco de Baseball",
  116.     "Pá",
  117.     "Taco de Sinuca",
  118.     "Espada",
  119.     "Serra Elétrica",
  120.     "Consolo Rosa",
  121.     "Consolo Pequeno Branco",
  122.     "Consolo Longo Branco",
  123.     "Vibrador",
  124.     "Flores",
  125.     "Bengala",
  126.     "Granada",
  127.     "Granada de Gás",
  128.     "Coquetel Molotov",
  129.     "Míssil Veícular",
  130.     "Flare de Hydra",
  131.     "Mochila a Jato",
  132.     "Pistola",
  133.     "Pistola com Silenciador",
  134.     "Pistola de Alto Calibre",
  135.     "Espingarda",
  136.     "Espingarda de Cano Serrado",
  137.     "Espingarda Automática",
  138.     "Sub-Metralhadora (UZI)",
  139.     "Sub-Metralhadora (MP5)",
  140.     "Fuzil (AK-47)",
  141.     "Fuzil (M4)",
  142.     "Sub-Metralhadora (TEC-9)",
  143.     "Carabina",
  144.     "Rifle com Mira",
  145.     "Lança-Foguetes",
  146.     "Lança-Foguetes Teleguiado",
  147.     "Lança-Chamas",
  148.     "Metralhadora",
  149.     "Explosivo",
  150.     "Detonador",
  151.     "Lata de Spray",
  152.     "Extintor",
  153.     "Câmera",
  154.     "Óculos de Visão Noturna",
  155.     "Óculos de Visão Infravermelha",
  156.     "Paraquedas",
  157.     "Pistola Falsa"
  158. };
  159.  
  160. new GunObjects[47][0] = { // (c) gimini
  161.     {0},// Emty // 0
  162.     {331},// Brass Knuckles
  163.     {333},// Golf Club
  164.     {334},// Nitestick
  165.     {335},// Knife
  166.     {336},// Baseball Bat
  167.     {337},// Showel
  168.     {338},// Pool Cue
  169.     {339},// Katana
  170.     {341},// Chainsaw
  171.     {321},// Purple Dildo
  172.     {322},// Small White Dildo
  173.     {323},// Long White Dildo
  174.     {324},// Vibrator
  175.     {325},// Flowers
  176.     {326},// Cane
  177.     {342},// Grenade
  178.     {343},// Tear Gas
  179.     {344},// Molotov
  180.     {0},
  181.     {0},
  182.     {0},
  183.     {346},// Glock
  184.     {347},// Silenced Colt
  185.     {348},// Desert Eagle
  186.     {349},// Shotgun
  187.     {350},// Sawn Off
  188.     {351},// Combat Shotgun
  189.     {352},// Micro UZI
  190.     {353},// MP5
  191.     {355},// AK47
  192.     {356},// M4
  193.     {372},// Tec9
  194.     {357},// Rifle
  195.     {358},// Sniper Rifle
  196.     {359},// Rocket Launcher
  197.     {360},// HS Rocket Launcher
  198.     {361},// Flamethrower
  199.     {362},// Minigun
  200.     {363},// Detonator
  201.     {364},// Detonator Button
  202.     {365},// Spraycan
  203.     {366},// Fire Extinguisher
  204.     {367},// Camera
  205.     {368},// Nightvision
  206.     {368},// Infrared Vision
  207.     {371}// Parachute
  208. };
  209.  
  210. //====================================[ENUMS]===================================
  211.  
  212. enum fInfo
  213. {
  214.     fType,
  215.     fName[24],
  216.     fLeader[24],
  217.     fMembers,
  218.     Float:fHQEntrnance[3],
  219.     Float:fHQExit[3],
  220.     fInterior,
  221.     fRank1[24],
  222.     fRank2[24],
  223.     fRank3[24],
  224.     fRank4[24],
  225.     fRank5[24],
  226.     fRank6[24],
  227.     fRank7[24],
  228.     fRank8[24],
  229.     fRank9[24],
  230.     fRank10[24],
  231.     fRank11[24],
  232.     fRank12[24],
  233.     fRank13[24],
  234.     fRank14[24],
  235.     fRank15[24]
  236. };
  237. new FactionInfo[MAX_FACTIONS][fInfo];
  238.  
  239. enum pInfo
  240. {
  241.     pRealName[32],
  242.     pHeight,
  243.     pWeight,
  244.     pTatoo[128],
  245.     pSkinColor,
  246.     pHairColor,
  247.     pEyeColor,
  248.     pBeard,
  249.     pCharDescription[128],
  250.     pBody,
  251.     pHairStyle,
  252.     pBeardStyle,
  253.     pKey[24],
  254.     pLevel,
  255.     pAdmin,
  256.     pYearsOn,
  257.     pMonthsOn,
  258.     pDaysOn,
  259.     pHoursOn,
  260.     pMinutesOn,
  261.     pSecondsOn,
  262.     pReg,
  263.     pSex,
  264.     pAge,
  265.     pPISTOL,
  266.     pPISTOL_SILENCED,
  267.     pDESERT_EAGLE,
  268.     pSHOTGUN,
  269.     pSAWNOFF_SHOTGUN,
  270.     pSPAS12_SHOTGUN,
  271.     pMICRO_UZI,
  272.     pMP5,
  273.     pAK47,
  274.     pM4,
  275.     pSNIPERRIFLE,
  276.     pOrigin[64],
  277.     pCK,
  278.     pExp,
  279.     pKills,
  280.     pDeaths,
  281.     pRadioFreq,
  282.     pRank,
  283.     Float:pHealth,
  284.     Float:pArmor,
  285.     Float:pPos[3],
  286.     pInt,
  287.     pFaction,
  288.     pGun1,
  289.     pGun2,
  290.     pGun3,
  291.     pAmmo1,
  292.     pAmmo2,
  293.     pAmmo3,
  294.     pTut,
  295.     pRadioAlias[MAX_PLAYER_NAME],
  296.     pOfficialAlias[MAX_PLAYER_NAME],
  297.     pWarns,
  298.     pVirWorld,
  299.     pFuel,
  300.     pSkin,
  301.     pSotaque
  302. };
  303. new PlayerInfo[MAX_PLAYERS][pInfo];
  304.  
  305. enum bInfo
  306. {
  307.     Float:bEntrancex,
  308.     Float:bEntrancey,
  309.     Float:bEntrancez,
  310.     Float:bExitx,
  311.     Float:bExity,
  312.     Float:bExitz,
  313.     bName[24],
  314.     Text3D:bText,
  315.     bLock,
  316.     bVW,
  317.     bInterior
  318. };
  319.  
  320. new BuildingInfo[MAX_BUILDINGS][bInfo];
  321.  
  322.  
  323. enum cInfo
  324. {
  325.     cModel,
  326.     Float:cLocationx,
  327.     Float:cLocationy,
  328.     Float:cLocationz,
  329.     Float:cAngle,
  330.     cColorOne,
  331.     cColorTwo,
  332.     cFaction,
  333.     cLock,
  334.     cInt,
  335.     cVW
  336. };
  337.  
  338. new CarInfo[MAX_VEHICLES][cInfo];
  339.  
  340.  
  341.  
  342. main()
  343. {
  344.     print("||       GM Básico de RP      ||");
  345.     printf("||Versão do Gamemode:  %s||", SCRIPT_VERSION);
  346.     print("||        Programado por: LeLeTe        ||");
  347. }
  348.  
  349. //===============================[MISC FUNCTIONS]===============================
  350.  
  351. stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
  352. {
  353.     if(IsPlayerConnected(playerid))
  354.     {
  355.         new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;
  356.         GetPlayerPos(playerid,PX,PY,PZ);
  357.         GetVehiclePos(vehicleid, X,Y,Z);
  358.         new Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
  359.         if(Distance <= radi*radi)
  360.         {
  361.             return 1;
  362.         }
  363.     }
  364.     return 0;
  365. }
  366.  
  367.  
  368.  
  369. forward Descongelar(playerid);
  370. public Descongelar(playerid)
  371. {
  372.     TogglePlayerControllable(playerid, 1);
  373.     DeletePVar(playerid, "Frozen");
  374. }
  375.  
  376. public GameModeExitFunc()
  377. {
  378.     GameModeExit();
  379. }
  380.  
  381. stock GetPlayerRank(playerid)
  382. {
  383.     switch (PlayerInfo[playerid][pRank])
  384.     {
  385.         case 1: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank1];
  386.         case 2: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank2];
  387.         case 3: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank3];
  388.         case 4: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank4];
  389.         case 5: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank5];
  390.         case 6: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank6];
  391.         case 7: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank7];
  392.         case 8: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank8];
  393.         case 9: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank9];
  394.         case 10: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank10];
  395.         case 11: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank11];
  396.         case 12: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank12];
  397.         case 13: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank13];
  398.         case 14: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank14];
  399.         case 15: return FactionInfo[PlayerInfo[playerid][pFaction]][fRank15];
  400.         default: return 0;
  401.     }
  402.     return 1;
  403. }
  404.  
  405. stock SafeResetPlayerWeapons(plyid)
  406. {
  407.     ResetPlayerWeapons(plyid);
  408.     return 1;
  409. }
  410.  
  411. stock GivePlayerWeaponEx(playerid,weaponid,ammo)
  412. {
  413.     new gun1, gun2, gun3;
  414.     gun1 = PlayerInfo[playerid][pGun1];
  415.     gun2 = PlayerInfo[playerid][pGun2];
  416.     gun3 = PlayerInfo[playerid][pGun3];
  417.     if(gun1 > 0 && gun1 != weaponid)
  418.     {
  419.         if(PlayerInfo[playerid][pGun2] > 0 && gun2 != weaponid)
  420.         {
  421.             if(PlayerInfo[playerid][pGun3] > 0 && gun3 != weaponid) return 0;
  422.             else
  423.             {
  424.                 PlayerInfo[playerid][pGun3] = weaponid;
  425.                 PlayerInfo[playerid][pAmmo3] += ammo;
  426.             }
  427.         }
  428.         else
  429.         {
  430.             PlayerInfo[playerid][pGun2] = weaponid;
  431.             PlayerInfo[playerid][pAmmo2] += ammo;
  432.         }
  433.     }
  434.     else
  435.     {
  436.         PlayerInfo[playerid][pGun1] = weaponid;
  437.         PlayerInfo[playerid][pAmmo1] += ammo;
  438.     }
  439.     return GivePlayerWeapon(playerid,weaponid,ammo);
  440. }
  441.  
  442. stock RemovePlayerWeapon(playerid, weaponid)
  443. {
  444.     new plyWeapons[12] = 0;
  445.     new plyAmmo[12] = 0;
  446.     for(new slot = 0; slot != 12; slot++)
  447.     {
  448.         new wep, ammo;
  449.         GetPlayerWeaponData(playerid, slot, wep, ammo);
  450.  
  451.         if(wep != weaponid && ammo != 0)
  452.         {
  453.             GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
  454.         }
  455.     }
  456.     SafeResetPlayerWeapons(playerid);
  457.     for(new slot = 0; slot != 12; slot++)
  458.     {
  459.         if(plyAmmo[slot] != 0)
  460.         {
  461.             GivePlayerWeaponEx(playerid, plyWeapons[slot], plyAmmo[slot]);
  462.         }
  463.     }
  464.     if(weaponid != PlayerInfo[playerid][pGun1])
  465.     {
  466.         if(weaponid != PlayerInfo[playerid][pGun2])
  467.         {
  468.             if(weaponid != PlayerInfo[playerid][pGun3]) return 0;
  469.             else
  470.             {
  471.                 PlayerInfo[playerid][pGun1] = 0;
  472.                 PlayerInfo[playerid][pAmmo1] = 0;
  473.             }
  474.         }
  475.         else
  476.         {
  477.             PlayerInfo[playerid][pGun1] = 0;
  478.             PlayerInfo[playerid][pAmmo1] = 0;
  479.         }
  480.     }
  481.     else
  482.     {
  483.         PlayerInfo[playerid][pGun1] = 0;
  484.         PlayerInfo[playerid][pAmmo1] = 0;
  485.     }
  486.     return 1;
  487. }
  488.  
  489. stock IsPlayerInRangeOfVehicle(playerid, vehicleid, Float: radius) {
  490.  
  491.     new
  492.         Float:Floats[3];
  493.  
  494.     GetVehiclePos(vehicleid, Floats[0], Floats[1], Floats[2]);
  495.     return IsPlayerInRangeOfPoint(playerid, radius, Floats[0], Floats[1], Floats[2]);
  496. }
  497.  
  498. stock IsPlayerInRangeOfPlayer(playerid, playerid2, Float: radius) {
  499.  
  500.     new
  501.         Float:Floats[3];
  502.  
  503.     GetPlayerPos(playerid2, Floats[0], Floats[1], Floats[2]);
  504.     return IsPlayerInRangeOfPoint(playerid, radius, Floats[0], Floats[1], Floats[2]);
  505. }
  506.  
  507. stock IsVehicleInRangeOfPoint(vehicleid, Float: radius, Float:x, Float:y, Float:z) {
  508.  
  509.     new
  510.         Float:Floats[6];
  511.  
  512.     GetVehiclePos(vehicleid, Floats[0], Floats[1], Floats[2]);
  513.     Floats[3] = (Floats[0] -x);
  514.     Floats[4] = (Floats[1] -y);
  515.     Floats[5] = (Floats[2] -z);
  516.     if (((Floats[3] < radius) && (Floats[3] > -radius)) && ((Floats[4] < radius) && (Floats[4] > -radius)) && ((Floats[5] < radius) && (Floats[5] > -radius)))
  517.         return 1;
  518.     return 0;
  519. }
  520.  
  521. stock nearByMessage(playerid, color, string[], Float: Distance = 12.0) {
  522.     new
  523.         Float: nbCoords[3];
  524.  
  525.     GetPlayerPos(playerid, nbCoords[0], nbCoords[1], nbCoords[2]);
  526.  
  527.     foreach(Player, i)
  528.     {
  529.         if(IsPlayerInRangeOfPoint(i, Distance, nbCoords[0], nbCoords[1], nbCoords[2]) && (GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)))
  530.         {
  531.             new stringfull[192];
  532.             new lengths[96];
  533.             new length2[96];
  534.             strmid(stringfull, string, 0, 192);
  535.             strmid(lengths, stringfull, 0, 96);
  536.             strmid(length2, string, 95, 192);
  537.             if(strlen(string) > 96)
  538.             {
  539.                 new message[128];
  540.                 format(message, 128, "%s ...", lengths);
  541.                 SendClientMessage(playerid, color, message);
  542.                 format(message, 128, "... %s", length2);
  543.                 SendClientMessage(playerid, color, message);
  544.             }
  545.             else
  546.             {
  547.                 new message[128];
  548.                 format(message, 128, "%s", string);
  549.                 SendClientMessage(playerid, color, message);
  550.             }
  551.         }
  552.     }
  553.  
  554.     return 1;
  555. }
  556.  
  557. stock ReturnPlayerNameEx( playerid )
  558. {
  559.     new
  560.     NameString[ MAX_PLAYER_NAME ],
  561.     stringPos;
  562.     GetPlayerName( playerid, NameString, MAX_PLAYER_NAME );
  563.     stringPos = strfind( NameString, "_" );
  564.     NameString[ stringPos ] = ' ';
  565.     return NameString;
  566. }
  567.  
  568. stock ReturnFullName( playerid )
  569. {
  570.     new
  571.     NameString[ MAX_PLAYER_NAME ];
  572.     GetPlayerName( playerid, NameString, MAX_PLAYER_NAME );
  573.     return NameString;
  574. }
  575.  
  576. new stock VehicleNames[213][] = {
  577.    "Landstalker",
  578.    "Bravura",
  579.    "Buffalo",
  580.    "Linerunner",
  581.    "Pereniel",
  582.    "Sentinel",
  583.    "Dumper",
  584.    "Firetruck",
  585.    "Trashmaster",
  586.    "Stretch",
  587.    "Manana",
  588.    "Infernus",
  589.    "Voodoo",
  590.    "Pony",
  591.    "Mule",
  592.    "Cheetah",
  593.    "Ambulance",
  594.    "Leviathan",
  595.    "Moonbeam",
  596.    "Esperanto",
  597.    "Taxi",
  598.    "Washington",
  599.    "Bobcat",
  600.    "Mr Whoopee",
  601.    "BF Injection",
  602.    "Hunter",
  603.    "Premier",
  604.    "Enforcer",
  605.    "Securicar",
  606.    "Banshee",
  607.    "Predator",
  608.    "Bus",
  609.    "Rhino",
  610.    "Barracks",
  611.    "Hotknife",
  612.    "Trailer", //artict1
  613.    "Previon",
  614.    "Coach",
  615.    "Cabbie",
  616.    "Stallion",
  617.    "Rumpo",
  618.    "RC Bandit",
  619.    "Romero",
  620.    "Packer",
  621.    "Monster",
  622.    "Admiral",
  623.    "Squalo",
  624.    "Seasparrow",
  625.    "Pizzaboy",
  626.    "Tram",
  627.    "Trailer", //artict2
  628.    "Turismo",
  629.    "Speeder",
  630.    "Reefer",
  631.    "Tropic",
  632.    "Flatbed",
  633.    "Yankee",
  634.    "Caddy",
  635.    "Solair",
  636.    "Berkley's RC Van",
  637.    "Skimmer",
  638.    "PCJ-600",
  639.    "Faggio",
  640.    "Freeway",
  641.    "RC Baron",
  642.    "RC Raider",
  643.    "Glendale",
  644.    "Oceanic",
  645.    "Sanchez",
  646.    "Sparrow",
  647.    "Patriot",
  648.    "Quad",
  649.    "Coastguard",
  650.    "Dinghy",
  651.    "Hermes",
  652.    "Sabre",
  653.    "Rustler",
  654.    "ZR3 50",
  655.    "Walton",
  656.    "Regina",
  657.    "Comet",
  658.    "BMX",
  659.    "Burrito",
  660.    "Camper",
  661.    "Marquis",
  662.    "Baggage",
  663.    "Dozer",
  664.    "Maverick",
  665.    "News Chopper",
  666.    "Rancher",
  667.    "FBI Rancher",
  668.    "Virgo",
  669.    "Greenwood",
  670.    "Jetmax",
  671.    "Hotring",
  672.    "Sandking",
  673.    "Blista Compact",
  674.    "Police Maverick",
  675.    "Boxville",
  676.    "Benson",
  677.    "Mesa",
  678.    "RC Goblin",
  679.    "Hotring Racer", //hotrina
  680.    "Hotring Racer", //hotrinb
  681.    "Bloodring Banger",
  682.    "Rancher",
  683.    "Super GT",
  684.    "Elegant",
  685.    "Journey",
  686.    "Bike",
  687.    "Mountain Bike",
  688.    "Beagle",
  689.    "Cropdust",
  690.    "Stunt",
  691.    "Tanker", //petro
  692.    "RoadTrain",
  693.    "Nebula",
  694.    "Majestic",
  695.    "Buccaneer",
  696.    "Shamal",
  697.    "Hydra",
  698.    "FCR-900",
  699.    "NRG-500",
  700.    "HPV1000",
  701.    "Cement Truck",
  702.    "Tow Truck",
  703.    "Fortune",
  704.    "Cadrona",
  705.    "FBI Truck",
  706.    "Willard",
  707.    "Forklift",
  708.    "Tractor",
  709.    "Combine",
  710.    "Feltzer",
  711.    "Remington",
  712.    "Slamvan",
  713.    "Blade",
  714.    "Freight",
  715.    "Streak",
  716.    "Vortex",
  717.    "Vincent",
  718.    "Bullet",
  719.    "Clover",
  720.    "Sadler",
  721.    "Firetruck", //firela
  722.    "Hustler",
  723.    "Intruder",
  724.    "Primo",
  725.    "Cargobob",
  726.    "Tampa",
  727.    "Sunrise",
  728.    "Merit",
  729.    "Utility",
  730.    "Nevada",
  731.    "Yosemite",
  732.    "Windsor",
  733.    "Monster", //monstera
  734.    "Monster", //monsterb
  735.    "Uranus",
  736.    "Jester",
  737.    "Sultan",
  738.    "Stratum",
  739.    "Elegy",
  740.    "Raindance",
  741.    "RC Tiger",
  742.    "Flash",
  743.    "Tahoma",
  744.    "Savanna",
  745.    "Bandito",
  746.    "Freight", //freiflat
  747.    "Trailer", //streakc
  748.    "Kart",
  749.    "Mower",
  750.    "Duneride",
  751.    "Sweeper",
  752.    "Broadway",
  753.    "Tornado",
  754.    "AT-400",
  755.    "DFT-30",
  756.    "Huntley",
  757.    "Stafford",
  758.    "BF-400",
  759.    "Newsvan",
  760.    "Tug",
  761.    "Trailer", //petrotr
  762.    "Emperor",
  763.    "Wayfarer",
  764.    "Euros",
  765.    "Hotdog",
  766.    "Club",
  767.    "Trailer", //freibox
  768.    "Trailer", //artict3
  769.    "Andromada",
  770.    "Dodo",
  771.    "RC Cam",
  772.    "Launch",
  773.    "Police Car (LSPD)",
  774.    "Police Car (SFPD)",
  775.    "Police Car (LVPD)",
  776.    "Police Ranger",
  777.    "Picador",
  778.    "S.W.A.T. Van",
  779.    "Alpha",
  780.    "Phoenix",
  781.    "Glendale",
  782.    "Sadler",
  783.    "Luggage Trailer", //bagboxa
  784.    "Luggage Trailer", //bagboxb
  785.    "Stair Trailer", //tugstair
  786.    "Boxville",
  787.    "Farm Plow", //farmtr1
  788.    "Utility Trailer", //utiltr1
  789.    "Invalid Vehicle" //just to return if the modelid is invalid
  790. };
  791.  
  792. stock ReturnVehicleID(vName[])
  793. {
  794.     for(new x; x != 211; x++) if(strfind(VehicleNames[x], vName, true) != -1) return x + 400;
  795.     return INVALID_VEHICLE_ID;
  796. }
  797.  
  798. stock ReturnVehicleNameID(vehicleid)
  799. {
  800.     new modelid;
  801.     modelid=GetVehicleModel(vehicleid);
  802.     return VehicleNames[(modelid-400)];
  803. }
  804.  
  805. stock ReturnVehicleNameModel(modelid)
  806. {
  807.     if(400<modelid || modelid>611)
  808.     {
  809.         modelid=612;
  810.     }
  811.     return VehicleNames[(modelid-400)];
  812. }
  813.  
  814. stock IsABoat(carid)
  815. {
  816.     if(GetVehicleModel(carid) == 472 || GetVehicleModel(carid) == 473 || GetVehicleModel(carid) == 593 || GetVehicleModel(carid) == 595 || GetVehicleModel(carid) == 484 || GetVehicleModel(carid) == 430 || GetVehicleModel(carid) == 453 || GetVehicleModel(carid) == 452 || GetVehicleModel(carid) == 446 || GetVehicleModel(carid) == 454)  return 1;
  817.     return 0;
  818. }
  819.  
  820. stock IsAHeli(carid)
  821. {
  822.     if( GetVehicleModel(carid) == 548 || GetVehicleModel(carid) == 425 || GetVehicleModel(carid) == 417 || GetVehicleModel(carid) == 487 || GetVehicleModel(carid) == 488 || GetVehicleModel(carid) == 497 || GetVehicleModel(carid) == 563 || GetVehicleModel(carid) == 447 || GetVehicleModel(carid) == 469) return 1;
  823.     return 0;
  824. }
  825.  
  826. stock IsABike(carid)
  827. {
  828.    if(GetVehicleModel(carid) == 509 || GetVehicleModel(carid) == 481 || GetVehicleModel(carid) == 510 || GetVehicleModel(carid) == 462 || GetVehicleModel(carid) == 448 || GetVehicleModel(carid) == 581 || GetVehicleModel(carid) == 522 || GetVehicleModel(carid) == 461 || GetVehicleModel(carid) == 521 || GetVehicleModel(carid) == 523 || GetVehicleModel(carid) == 463 || GetVehicleModel(carid) == 586 || GetVehicleModel(carid) == 468 || GetVehicleModel(carid) == 471)   return 1;
  829.     return 0;
  830. }
  831.  
  832. stock IsAPlane(carid)
  833. {
  834.     if(GetVehicleModel(carid) == 592 || GetVehicleModel(carid) == 593 || GetVehicleModel(carid) == 511 || GetVehicleModel(carid) == 512 || GetVehicleModel(carid) == 577 || GetVehicleModel(carid) == 593 || GetVehicleModel(carid) == 520 || GetVehicleModel(carid) == 553 || GetVehicleModel(carid) == 476 || GetVehicleModel(carid) == 519 || GetVehicleModel(carid) == 460 || GetVehicleModel(carid) == 513)        return 1;
  835.     return 0;
  836. }
  837.  
  838. stock INI_Exist(nickname)
  839. {
  840.     new str[40], _xstring[24];
  841.     GetPlayerName(nickname, _xstring, 24);
  842.     format(str,sizeof(str),"Contas/%s.ini", _xstring);
  843.     return fexist(str);
  844. }
  845.  
  846. stock ReturnWeaponName(weaponid)
  847. {
  848.     return GunNames[weaponid];
  849. }
  850.  
  851. stock SetPlayerSpawn(playerid)
  852. {
  853.     if(IsPlayerConnected(playerid))
  854.     {
  855.         SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  856.         if(PlayerInfo[playerid][pTut] == 0)
  857.         {
  858.             SetPlayerPos(playerid, -133.2492,1124.9255,20.9518);
  859.             SetPlayerCameraPos(playerid, -136.1206,1124.8572,27.1411);
  860.             SetPlayerCameraLookAt(playerid, -144.9004,1124.2347,21.4658);
  861.             TogglePlayerControllable(playerid, 0);
  862.             ShowPlayerDialog(playerid, DIALOG_CREATION, DIALOG_STYLE_MSGBOX, "Criação de Personagens || {FF0000}Sexo", "Selecione se seu personagem será Masculino ou Feminino.", "Masculino", "Feminino");
  863.             return 1;
  864.         }
  865.         if(PlayerInfo[playerid][pAdmin] >= 1)
  866.         {
  867.             SetPVarInt(playerid, "ReadAdminWarning", 1);
  868.             SetPVarInt(playerid, "ReadAdminChat", 1);
  869.             SetPVarInt(playerid, "ReadSystemWarning", 1);
  870.         }
  871.         SetSpawnInfo(playerid, PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2], 1.0, -1, -1, -1, -1, -1, -1);
  872.         SetPlayerFacingAngle(playerid, 0);
  873.         SetPlayerInterior(playerid,0);
  874.         PlayerInfo[playerid][pInt] = 0;
  875.     }
  876.     return 1;
  877. }
  878.  
  879. //================================[LOG FUNCTIONS]===============================
  880.  
  881. stock CKLog(string[])
  882. {
  883.     new Year, Month, Day, Hour, Minute, Second;
  884.     getdate(Year, Month, Day);
  885.     gettime(Hour, Minute, Second);
  886.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  887.     new File:hFile;
  888.     hFile = fopen("Logs/CK.log", io_append);
  889.     fwrite(hFile, _largestring);
  890.     fclose(hFile);
  891. }
  892.  
  893. stock DebugLog(string[])
  894. {
  895.     new Year, Month, Day, Hour, Minute, Second;
  896.     getdate(Year, Month, Day);
  897.     gettime(Hour, Minute, Second);
  898.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  899.     new File:hFile;
  900.     hFile = fopen("Logs/Debug.log", io_append);
  901.     fwrite(hFile, _largestring);
  902.     print(_largestring);
  903.     fclose(hFile);
  904. }
  905.  
  906. stock PayLog(string[])
  907. {
  908.     new Year, Month, Day, Hour, Minute, Second;
  909.     getdate(Year, Month, Day);
  910.     gettime(Hour, Minute, Second);
  911.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  912.     new File:hFile;
  913.     hFile = fopen("Logs/Pay.log", io_append);
  914.     fwrite(hFile, _largestring);
  915.     fclose(hFile);
  916. }
  917.  
  918. stock KickLog(string[])
  919. {
  920.     new Year, Month, Day, Hour, Minute, Second;
  921.     getdate(Year, Month, Day);
  922.     gettime(Hour, Minute, Second);
  923.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  924.     new File:hFile;
  925.     hFile = fopen("Logs/Kick.log", io_append);
  926.     fwrite(hFile, _largestring);
  927.     fclose(hFile);
  928. }
  929.  
  930. stock BanLog(string[])
  931. {
  932.     new Year, Month, Day, Hour, Minute, Second;
  933.     getdate(Year, Month, Day);
  934.     gettime(Hour, Minute, Second);
  935.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  936.     new File:hFile;
  937.     hFile = fopen("Logs/Ban.log", io_append);
  938.     fwrite(hFile, _largestring);
  939.     fclose(hFile);
  940. }
  941.  
  942. stock AdminLog(string[])
  943. {
  944.     new Year, Month, Day, Hour, Minute, Second;
  945.     getdate(Year, Month, Day);
  946.     gettime(Hour, Minute, Second);
  947.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  948.     new File:hFile;
  949.     hFile = fopen("Logs/Admin.log", io_append);
  950.     fwrite(hFile, _largestring);
  951.     fclose(hFile);
  952. }
  953.  
  954. stock SystemLog(string[])
  955. {
  956.     new Year, Month, Day, Hour, Minute, Second;
  957.     getdate(Year, Month, Day);
  958.     gettime(Hour, Minute, Second);
  959.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  960.     new File:hFile;
  961.     hFile = fopen("Logs/Sistema.log", io_append);
  962.     fwrite(hFile, _largestring);
  963.     fclose(hFile);
  964. }
  965.  
  966. stock OOCLog(string[])
  967. {
  968.     new Year, Month, Day, Hour, Minute, Second;
  969.     getdate(Year, Month, Day);
  970.     gettime(Hour, Minute, Second);
  971.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  972.     new File:hFile;
  973.     hFile = fopen("Logs/OOC.log", io_append);
  974.     fwrite(hFile, _largestring);
  975.     fclose(hFile);
  976. }
  977.  
  978. stock LoginLog(string[])
  979. {
  980.     new Year, Month, Day, Hour, Minute, Second;
  981.     getdate(Year, Month, Day);
  982.     gettime(Hour, Minute, Second);
  983.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%02d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  984.     new File:hFile;
  985.     hFile = fopen("Logs/Login.log", io_append);
  986.     fwrite(hFile, _largestring);
  987.     fclose(hFile);
  988. }
  989.  
  990. stock TeamLog(string[])
  991. {
  992.     new Year, Month, Day, Hour, Minute, Second;
  993.     getdate(Year, Month, Day);
  994.     gettime(Hour, Minute, Second);
  995.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%02d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  996.     new File:hFile;
  997.     hFile = fopen("Logs/Team.log", io_append);
  998.     fwrite(hFile, _largestring);
  999.     fclose(hFile);
  1000. }
  1001.  
  1002. stock WalkieLog(string[])
  1003. {
  1004.     new Year, Month, Day, Hour, Minute, Second;
  1005.     getdate(Year, Month, Day);
  1006.     gettime(Hour, Minute, Second);
  1007.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%02d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  1008.     new File:hFile;
  1009.     hFile = fopen("Logs/Walkie.log", io_append);
  1010.     fwrite(hFile, _largestring);
  1011.     fclose(hFile);
  1012. }
  1013.  
  1014. stock RadioLog(string[])
  1015. {
  1016.     new Year, Month, Day, Hour, Minute, Second;
  1017.     getdate(Year, Month, Day);
  1018.     gettime(Hour, Minute, Second);
  1019.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%02d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  1020.     new File:hFile;
  1021.     hFile = fopen("Logs/Radio.log", io_append);
  1022.     fwrite(hFile, _largestring);
  1023.     fclose(hFile);
  1024. }
  1025.  
  1026. stock FactionLog(string[])
  1027. {
  1028.     new Year, Month, Day, Hour, Minute, Second;
  1029.     getdate(Year, Month, Day);
  1030.     gettime(Hour, Minute, Second);
  1031.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%02d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  1032.     new File:hFile;
  1033.     hFile = fopen("Logs/Family.log", io_append);
  1034.     fwrite(hFile, _largestring);
  1035.     fclose(hFile);
  1036. }
  1037.  
  1038. stock CommandLog(string[])
  1039. {
  1040.     new Year, Month, Day, Hour, Minute, Second;
  1041.     getdate(Year, Month, Day);
  1042.     gettime(Hour, Minute, Second);
  1043.     format(_largestring, sizeof(_largestring), "[%02d/%02d/%02d]-[%02d:%02d:%02d]: %s\r\n",Day, Month, Year, Hour, Minute, Second, string);
  1044.     new File:hFile;
  1045.     hFile = fopen("Logs/Comandos.log", io_append);
  1046.     fwrite(hFile, _largestring);
  1047.     fclose(hFile);
  1048. }
  1049.  
  1050. //==============================[LOADING FUNCTIONS]=============================
  1051.  
  1052. stock LoadWeapons()
  1053. {
  1054.     new File: file = fopen("weapons.cfg", io_read);
  1055.     if (file)
  1056.     {
  1057.         new idx;
  1058.         while (idx < sizeof(ObjCoords))
  1059.         {
  1060.             fread(file, _largestring);
  1061.             sscanf(_largestring,"p<,>dddfff",
  1062.             ObjectID[idx][0],
  1063.             ObjectID[idx][1],
  1064.             ObjectID[idx][2],
  1065.             ObjCoords[idx][0],
  1066.             ObjCoords[idx][1],
  1067.             ObjCoords[idx][2]);
  1068.             idx++;
  1069.         }
  1070.         fclose(file);
  1071.     }
  1072.     return 1;
  1073. }
  1074.  
  1075. stock LoadFactions()
  1076. {
  1077.     for(new i = 0; i < sizeof(FactionInfo); i++)
  1078.     {
  1079.         new b[32];
  1080.         format(b, sizeof (b), "Times/Time %d.ini", i);
  1081.         INI_ParseFile(b, "LoadFaction", false, true, i);
  1082.     }
  1083.     return 1;
  1084. }
  1085.  
  1086. forward LoadFactionEx(idx, name[], value[]);
  1087. public LoadFactionEx(idx, name[], value[])
  1088. {
  1089.     if(!strcmp(name, "Type")) FactionInfo[idx][fType] = strval(value);
  1090.     if(!strcmp(name, "Name"))
  1091.     {
  1092.         new cameo[24];
  1093.         strmid(cameo, value, 0, 255);
  1094.         FactionInfo[idx][fName] = cameo;
  1095.     }
  1096.     if(!strcmp(name, "Leader"))
  1097.     {
  1098.         new cameo[24];
  1099.         strmid(cameo, value, 0, 255);
  1100.         FactionInfo[idx][fLeader] = cameo;
  1101.     }
  1102.     if(!strcmp(name, "Members")) FactionInfo[idx][fInterior]= strval(value);
  1103.     if(!strcmp(name, "Interior")) FactionInfo[idx][fMembers]= strval(value);
  1104.     if(!strcmp(name, "HQEN_X")) FactionInfo[idx][fHQEntrnance][0]= floatstr(value);
  1105.     if(!strcmp(name, "HQEN_Y")) FactionInfo[idx][fHQEntrnance][1]= floatstr(value);
  1106.     if(!strcmp(name, "HQEN_Z")) FactionInfo[idx][fHQEntrnance][2]= floatstr(value);
  1107.     if(!strcmp(name, "HQEX_X")) FactionInfo[idx][fHQExit][0]= floatstr(value);
  1108.     if(!strcmp(name, "HQEX_Y")) FactionInfo[idx][fHQExit][1]= floatstr(value);
  1109.     if(!strcmp(name, "HQEX_Z")) FactionInfo[idx][fHQExit][2]= floatstr(value);
  1110.     if(!strcmp(name, "Rank1"))
  1111.     {
  1112.         new cameo[24];
  1113.         strmid(cameo, value, 0, 255);
  1114.         FactionInfo[idx][fRank1] = cameo;
  1115.     }
  1116.     if(!strcmp(name, "Rank2"))
  1117.     {
  1118.         new cameo[24];
  1119.         strmid(cameo, value, 0, 255);
  1120.         FactionInfo[idx][fRank2] = cameo;
  1121.     }
  1122.     if(!strcmp(name, "Rank3"))
  1123.     {
  1124.         new cameo[24];
  1125.         strmid(cameo, value, 0, 255);
  1126.         FactionInfo[idx][fRank3] = cameo;
  1127.     }
  1128.     if(!strcmp(name, "Rank4"))
  1129.     {
  1130.         new cameo[24];
  1131.         strmid(cameo, value, 0, 255);
  1132.         FactionInfo[idx][fRank4] = cameo;
  1133.     }
  1134.     if(!strcmp(name, "Rank5"))
  1135.     {
  1136.         new cameo[24];
  1137.         strmid(cameo, value, 0, 255);
  1138.         FactionInfo[idx][fRank5] = cameo;
  1139.     }
  1140.     if(!strcmp(name, "Rank6"))
  1141.     {
  1142.         new cameo[24];
  1143.         strmid(cameo, value, 0, 255);
  1144.         FactionInfo[idx][fRank6] = cameo;
  1145.     }
  1146.     if(!strcmp(name, "Rank7"))
  1147.     {
  1148.         new cameo[24];
  1149.         strmid(cameo, value, 0, 255);
  1150.         FactionInfo[idx][fRank7] = cameo;
  1151.     }
  1152.     if(!strcmp(name, "Rank8"))
  1153.     {
  1154.         new cameo[24];
  1155.         strmid(cameo, value, 0, 255);
  1156.         FactionInfo[idx][fRank8] = cameo;
  1157.     }
  1158.     if(!strcmp(name, "Rank9"))
  1159.     {
  1160.         new cameo[24];
  1161.         strmid(cameo, value, 0, 255);
  1162.         FactionInfo[idx][fRank9] = cameo;
  1163.     }
  1164.     if(!strcmp(name, "Rank10"))
  1165.     {
  1166.         new cameo[24];
  1167.         strmid(cameo, value, 0, 255);
  1168.         FactionInfo[idx][fRank10] = cameo;
  1169.     }
  1170.     if(!strcmp(name, "Rank11"))
  1171.     {
  1172.         new cameo[24];
  1173.         strmid(cameo, value, 0, 255);
  1174.         FactionInfo[idx][fRank11] = cameo;
  1175.     }
  1176.     if(!strcmp(name, "Rank12"))
  1177.     {
  1178.         new cameo[24];
  1179.         strmid(cameo, value, 0, 255);
  1180.         FactionInfo[idx][fRank12] = cameo;
  1181.     }
  1182.     if(!strcmp(name, "Rank13"))
  1183.     {
  1184.         new cameo[24];
  1185.         strmid(cameo, value, 0, 255);
  1186.         FactionInfo[idx][fRank13] = cameo;
  1187.     }
  1188.     if(!strcmp(name, "Rank14"))
  1189.     {
  1190.         new cameo[24];
  1191.         strmid(cameo, value, 0, 255);
  1192.         FactionInfo[idx][fRank14] = cameo;
  1193.     }
  1194.     if(!strcmp(name, "Rank15"))
  1195.     {
  1196.         new cameo[24];
  1197.         strmid(cameo, value, 0, 255);
  1198.         FactionInfo[idx][fRank15] = cameo;
  1199.     }
  1200.     return 1;
  1201. }
  1202.  
  1203. stock LoadCar()
  1204. {
  1205.     for(new i = 0; i < sizeof(CarInfo); i++)
  1206.     {
  1207.         new b[32];
  1208.         format(b, sizeof (b), "Carros/Veiculo %d.ini", i);
  1209.         INI_ParseFile(b, "LoadCarEx", false, true, i);
  1210.     }
  1211.     return 1;
  1212. }
  1213.  
  1214. forward LoadCarEx(idx, name[], value[]);
  1215. public LoadCarEx(idx, name[], value[])
  1216. {
  1217.     if(!strcmp(name, "Modelo")) CarInfo[idx][cModel] = strval(value);
  1218.     if(!strcmp(name, "Pos_X")) CarInfo[idx][cLocationx]= floatstr(value);
  1219.     if(!strcmp(name, "Pos_Y")) CarInfo[idx][cLocationy]= floatstr(value);
  1220.     if(!strcmp(name, "Pos_Z")) CarInfo[idx][cLocationz]= floatstr(value);
  1221.     if(!strcmp(name, "Angulo")) CarInfo[idx][cAngle]= floatstr(value);
  1222.     if(!strcmp(name, "Cor_1")) CarInfo[idx][cColorOne]= strval(value);
  1223.     if(!strcmp(name, "Cor_2")) CarInfo[idx][cColorTwo]= strval(value);
  1224.     if(!strcmp(name, "Faction")) CarInfo[idx][cFaction]= strval(value);
  1225.     if(!strcmp(name, "Lock")) CarInfo[idx][cLock]= strval(value);
  1226.     if(!strcmp(name, "Int")) CarInfo[idx][cInt]= strval(value);
  1227.     if(!strcmp(name, "VW")) CarInfo[idx][cVW]= strval(value);
  1228. }
  1229.  
  1230. forward LoadBuildings();
  1231. public LoadBuildings()
  1232. {
  1233.     for(new i = 0; i < sizeof(BuildingInfo); i++)
  1234.     {
  1235.         new b[32];
  1236.         format(b, sizeof (b), "Interiores/Interior %d.ini", i);
  1237.         INI_ParseFile(b, "LoadBuildingEx", false, true, i);
  1238.     }
  1239.     return 1;
  1240. }
  1241.  
  1242. forward LoadBuildingEx(idx, name[], value[]);
  1243. public LoadBuildingEx(idx, name[], value[])
  1244. {
  1245.     if(!strcmp(name, "Entrada_X")) BuildingInfo[idx][bEntrancex] = floatstr(value);
  1246.     if(!strcmp(name, "Entrada_Y")) BuildingInfo[idx][bEntrancey] = floatstr(value);
  1247.     if(!strcmp(name, "Entrada_Z")) BuildingInfo[idx][bEntrancez] = floatstr(value);
  1248.     if(!strcmp(name, "Saida_X")) BuildingInfo[idx][bExitx] = floatstr(value);
  1249.     if(!strcmp(name, "Saida_Y")) BuildingInfo[idx][bExity] = floatstr(value);
  1250.     if(!strcmp(name, "Saida_Z")) BuildingInfo[idx][bExitz] = floatstr(value);
  1251.     if(!strcmp(name, "Lock")) BuildingInfo[idx][bLock] = strval(value);
  1252.     if(!strcmp(name, "VW")) BuildingInfo[idx][bVW] = strval(value);
  1253.     if(!strcmp(name, "Int")) BuildingInfo[idx][bInterior] = strval(value);
  1254.     if(!strcmp(name, "Name")) strmid(BuildingInfo[idx][bName], value, 0, strlen(value), 255);
  1255.     return 1;
  1256. }
  1257.  
  1258. //==========================[GLOBAL/PUBLIC FUNCTIONS]==========================
  1259.  
  1260. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1261. {
  1262.     #if defined DEBUG
  1263.         format(_largestring, 1280, "[OnDialogResponse] \"%s\" - %d, %d, %d, %d, \"%s\"", ReturnPlayerNameEx(playerid), playerid, dialogid, response, listitem, inputtext);
  1264.         DebugLog(_largestring);
  1265.     #endif
  1266.     switch (dialogid)
  1267.     {
  1268.         case DIALOG_LOGIN:
  1269.         {
  1270.             if(!response) return SendClientMessage(playerid, 0xFF0000FF, "Você não quis logar, por isso, será kickado."), Kick(playerid);
  1271.             if (GetPVarInt(playerid, "PlayerAccount") != 0)
  1272.             {
  1273.                 format(_largestring, 180, "Bem Vindo de volta, %s!\nDetectamos que você tem uma conta neste servidor!\nDigite a senha referente a este personagem abaixo:", ReturnPlayerNameEx(playerid));
  1274.                 if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Seu servidor", _largestring, "Logar", "Sair");
  1275.                 format(_string, 128, "Contas/%s.ini", ReturnFullName(playerid));
  1276.                 SetPVarString(playerid, "PassW", inputtext);
  1277.                 INI_ParseFile(_string, "Logar", false, true, playerid);
  1278.             }
  1279.             else
  1280.             {
  1281.                 if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Seu servidor", "Você tem que registrar a senha referente a seu personagem para poder jogar!", "Logar", "Sair");
  1282.                 GetPlayerName(playerid, _playername, 24);
  1283.                 format(_string, sizeof(_string), "Contas/%s.ini", _playername);
  1284.                 if (INI_Exist(playerid))
  1285.                 {
  1286.                     format(_string, 128, "Contas/%s.ini", ReturnFullName(playerid));
  1287.                     SetPVarString(playerid, "PassW", inputtext);
  1288.                     INI_ParseFile(_string, "Logar", false, true, playerid);
  1289.                     return 1;
  1290.                 }
  1291.                 OnPlayerRegister(playerid,inputtext);
  1292.             }
  1293.             return 1;
  1294.         }
  1295.         case DIALOG_CREATION:
  1296.         {
  1297.             if(response)
  1298.             {
  1299.                 PlayerInfo[playerid][pSex] = 1;
  1300.                 ShowPlayerDialog(playerid, DIALOG_CREATION+1, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Etnia", "Digite aqui a nacionalidade de seu personagem.\nExemplo: Se você veio do Brasil, digite Brasileiro.", "Selecionar", "Voltar");
  1301.                 return 0;
  1302.             }
  1303.             else
  1304.             {
  1305.                 PlayerInfo[playerid][pSex] = 2;
  1306.                 ShowPlayerDialog(playerid, DIALOG_CREATION+1, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Etnia", "Digite aqui a nacionalidade de seu personagem.\nExemplo: Se você veio do Brasil, digite Brasileiro.", "Selecionar", "Voltar");
  1307.                 return 0;
  1308.             }
  1309.         }
  1310.         case DIALOG_CREATION+1:
  1311.         {
  1312.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION, DIALOG_STYLE_MSGBOX, "Criação de Personagens || {FF0000}Sexo", "Selecione se seu personagem será Masculino ou Feminino.", "Masculino", "Feminino");
  1313.             new text[64];
  1314.             strmid(text, inputtext, 0, 64);
  1315.             PlayerInfo[playerid][pOrigin] = text;
  1316.             return ShowPlayerDialog(playerid, DIALOG_CREATION+2, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Idade", "Digite a data de seu nascimento\nFormato: Dia/Mês/Ano (Somente números!)", "Ok", "Voltar");
  1317.         }
  1318.         case DIALOG_CREATION+2:
  1319.         {
  1320.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+1, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Idade", "Digite aqui a nacionalidade de seu personagem.\nExemplo: Se você veio do Brasil, digite Brasileiro.", "Selecionar", "Voltar");
  1321.             {
  1322.                 new year, month, day;
  1323.                 getdate(year, month, day);
  1324.                 new DateInfo[3];
  1325.                 sscanf(inputtext, "p</>ddd",DateInfo[0], DateInfo[1], DateInfo[2]);
  1326.                 if(DateInfo[0] < 1 || DateInfo[0] > 31 || DateInfo[1] < 1 || DateInfo[1] > 12 || year - DateInfo[2] < 18 || year - DateInfo[2] > 100)
  1327.                 {
  1328.                     ShowPlayerDialog(playerid, DIALOG_CREATION+2, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Idade", "{FF0000}ERRO! Você digitou uma data inválida.\n{A9C4E4}Digite a data de seu nascimento\nFormato: Dia/Mês/Ano (Somente números!)", "Ok", "Voltar");
  1329.                     return 0;
  1330.                 }
  1331.                 ShowPlayerDialog(playerid, DIALOG_CREATION+4, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Altura", "Digite sua Altura Abaixo, em centímetros (Ex: 1 metro e 60 cm ficariam 160.)\n Não coloque vírgulas!", "Ok", "Voltar");
  1332.                 return 0;
  1333.             }
  1334.         }
  1335.         case DIALOG_CREATION+3:
  1336.         {
  1337.             if(!response) ShowPlayerDialog(playerid, DIALOG_CREATION+2, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Idade", "Digite a data de seu nascimento\nFormato: Dia/Mês/Ano (Somente números!)", "Ok", "Voltar");
  1338.             switch(listitem)
  1339.             {
  1340.                 case 0: return ShowPlayerDialog(playerid, DIALOG_CREATION+4, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Altura", "Digite sua Altura Abaixo, em centímetros (Ex: 1 metro e 60 cm ficariam 160.)\n Não coloque vírgulas!", "Ok", "Voltar");
  1341.                 case 1: return ShowPlayerDialog(playerid, DIALOG_CREATION+5, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Peso", "Digite abaixo seu peso, em kilogramas.\n Não coloque vírgulas!", "Ok", "Voltar");
  1342.                 case 2: return ShowPlayerDialog(playerid, DIALOG_CREATION+6, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Tatuagens", "Digite informações sobre suas tatuagens. (Ex: Caveira com Bandana nas Costas.)\n Limite de 128 caracteres!", "Ok", "Voltar");
  1343.                 case 3: return ShowPlayerDialog(playerid, DIALOG_CREATION+7, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor do Cabelo", "Louro\nCastanho Bem Claro\nCastanho Claro\nCastanho\nCastanho Escuro\nMoreno\nPreto\nAzul\nRosa\nVermelho\nVerde", "Ok", "Voltar");
  1344.                 case 4: return ShowPlayerDialog(playerid, DIALOG_CREATION+8, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor de Pele", "Negra\nParda\nÍndia\nAsiática\nÁrabe\nCaucasiana\nAlbina", "Ok", "Voltar");
  1345.                 case 5: return ShowPlayerDialog(playerid, DIALOG_CREATION+10, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Outras Descrições", "Digite descrições como defeitos, cicatrizes, etc, aqui.\n128 caracteres de limite!", "Ok", "Voltar");
  1346.                 case 6: return ShowPlayerDialog(playerid, DIALOG_CREATION+11, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor dos Olhos", "{6B4226}Castanho Escuro\n{855E42}Castanho Claro\n{3D9140}Verde\n{3300FF}Azul", "Ok", "Voltar");
  1347.                 case 7: return ShowPlayerDialog(playerid, DIALOG_CREATION+12, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Definição Corporal", "Muito Magro\nMagro\nEsbelto\nSarado\nBombado\nGordo\nMuito Gordo", "Ok", "Voltar");
  1348.                 case 9: return ShowPlayerDialog(playerid, DIALOG_CREATION+9, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Selecione agora como você veio para Los Santos", "De Barco\nDe Avião\nDe Trem\nNascido Aqui\nVeio Ilegalmente", "Proceder", "Sair");
  1349.                 case 8: return ShowPlayerDialog(playerid, DIALOG_CREATION+19, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Roupas", "Digite abaixo o número da sua skin\n{FF0000}(OBS: Ela tem de ser maior que 8 e menor que 299!)", "Proceder", "Sair");
  1350.             }
  1351.         }
  1352.         case DIALOG_CREATION+4:
  1353.         {
  1354.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+2, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Idade", "Digite a data de seu nascimento\nFormato: Dia/Mês/Ano (Somente números!)", "Ok", "Voltar");
  1355.             new height;
  1356.             height = strval(inputtext);
  1357.             if(height > 220 || height < 130 || height == 0) return ShowPlayerDialog(playerid, DIALOG_CREATION+4, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Altura", "Digite sua Altura Abaixo, em centímetros (Ex: 1 metro e 60 cm ficariam 160.)\n{FF0000} Você deve selecionar uma altura entre 130 e 220 centímetros!!\n Não coloque vírgulas!", "Ok", "Voltar");
  1358.             PlayerInfo[playerid][pHeight] = height;
  1359.             return ShowPlayerDialog(playerid, DIALOG_CREATION+5, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Peso", "Digite abaixo seu peso, em kilogramas.\n Não coloque vírgulas!", "Ok", "Voltar");
  1360.         }
  1361.         case DIALOG_CREATION+5:
  1362.         {
  1363.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+4, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Altura", "Digite sua Altura Abaixo, em centímetros (Ex: 1 metro e 60 cm ficariam 160.)\n{FF0000} Você deve selecionar uma altura entre 130 e 220 centímetros!!\n Não coloque vírgulas!", "Ok", "Voltar");
  1364.             new weight;
  1365.             weight = strval(inputtext);
  1366.             if(weight > 170 || weight < 45 || weight == 0) return ShowPlayerDialog(playerid, DIALOG_CREATION+5, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Peso", "Digite abaixo seu peso, em kilogramas.\n{FF0000} Seu peso deve ser entre 45 e 170 kilos!\n Não coloque vírgulas!", "Ok", "Voltar");
  1367.             PlayerInfo[playerid][pWeight] = weight;
  1368.             return ShowPlayerDialog(playerid, DIALOG_CREATION+6, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Tatuagens", "Digite informações sobre suas tatuagens. (Ex: Caveira com Bandana nas Costas.)\n Limite de 128 caracteres!", "Ok", "Voltar");
  1369.         }
  1370.         case DIALOG_CREATION+6:
  1371.         {
  1372.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+5, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Peso", "Digite abaixo seu peso, em kilogramas.\n{FF0000} Seu peso deve ser entre 45 e 170 kilos!\n Não coloque vírgulas!", "Ok", "Voltar");
  1373.             new tatoos[128];
  1374.             strmid(tatoos, inputtext, 0, 255);
  1375.             PlayerInfo[playerid][pTatoo] = tatoos;
  1376.             return ShowPlayerDialog(playerid, DIALOG_CREATION+7, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor do Cabelo", "Louro\nCastanho Bem Claro\nCastanho Claro\nCastanho\nCastanho Escuro\nMoreno\nPreto\nAzul\nRosa\nVermelho\nVerde", "Ok", "Voltar");
  1377.         }
  1378.         case DIALOG_CREATION+7:
  1379.         {
  1380.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+6, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Tatuagens", "Digite informações sobre suas tatuagens. (Ex: Caveira com Bandana nas Costas.)\n Limite de 128 caracteres!", "Ok", "Voltar");
  1381.             PlayerInfo[playerid][pHairColor] = listitem+1;
  1382.             return ShowPlayerDialog(playerid, DIALOG_CREATION+8, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor de Pele", "Negra\nParda\nÍndia\nAsiática\nÁrabe\nCaucasiana\nAlbina", "Ok", "Voltar");
  1383.         }
  1384.         case DIALOG_CREATION+8:
  1385.         {
  1386.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+7, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor do Cabelo", "Louro\nCastanho Bem Claro\nCastanho Claro\nCastanho\nCastanho Escuro\nMoreno\nPreto\nAzul\nRosa\nVermelho\nVerde", "Ok", "Voltar");
  1387.             PlayerInfo[playerid][pSkinColor] = listitem+1;
  1388.             return ShowPlayerDialog(playerid, DIALOG_CREATION+10, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Outras Descrições", "Digite descrições como defeitos, cicatrizes, etc, aqui.\n128 caracteres de limite!", "Ok", "Voltar");
  1389.         }
  1390.         case DIALOG_CREATION+9:
  1391.         {
  1392.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+19, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Roupas", "Digite abaixo o número da sua skin\n{FF0000}(OBS: Ela tem de ser maior que 8 e menor que 299!)", "Proceder", "Sair");
  1393.             PlayerInfo[playerid][pTut] = 1;
  1394.             TogglePlayerControllable(playerid, 1);
  1395.             SetPlayerPos(playerid, 2078.2712,1286.1401,10.8203);
  1396.             PlayerInfo[playerid][pPos][0] = 2078.2712;
  1397.             PlayerInfo[playerid][pPos][1] = 1286.1401;
  1398.             PlayerInfo[playerid][pPos][2] = 10.8203;
  1399.             OnPlayerUpdateEx(playerid);
  1400.             SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2], 0, 0, 0, 0, 0, 0, 0);
  1401.             SendClientMessage(playerid, 0xAFAFAFFF, "[{A9C4E4}!{AFAFAF}] Você acaba de completar o tutorial de criação de seu personagem. Bom jogo! [{A9C4E4}!{AFAFAF}]");
  1402.             return SpawnPlayer(playerid);
  1403.         }
  1404.         case DIALOG_CREATION+10:
  1405.         {
  1406.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+8, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor de Pele", "Negra\nParda\nÍndia\nAsiática\nÁrabe\nCaucasiana\nAlbina", "Ok", "Voltar");
  1407.             new desc[128];
  1408.             strmid(desc, inputtext, 0, 255);
  1409.             PlayerInfo[playerid][pCharDescription] = desc;
  1410.             return ShowPlayerDialog(playerid, DIALOG_CREATION+11, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor dos Olhos", "{6B4226}Castanho Escuro\n{855E42}Castanho Claro\n{3D9140}Verde\n{3300FF}Azul", "Ok", "Voltar");
  1411.         }
  1412.         case DIALOG_CREATION+11:
  1413.         {
  1414.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+10, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Outras Descrições", "Digite descrições como defeitos, cicatrizes, etc, aqui.\n128 caracteres de limite!", "Ok", "Voltar");
  1415.             PlayerInfo[playerid][pEyeColor] = listitem+1;
  1416.             return ShowPlayerDialog(playerid, DIALOG_CREATION+12, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Definição Corporal", "Muito Magro\nMagro\nEsbelto\nSarado\nBombado\nGordo\nMuito Gordo", "Ok", "Voltar");
  1417.         }
  1418.         case DIALOG_CREATION+12:
  1419.         {
  1420.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+11, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Cor dos Olhos", "{6B4226}Castanho Escuro\n{855E42}Castanho Claro\n{3D9140}Verde\n{3300FF}Azul", "Ok", "Voltar");
  1421.             PlayerInfo[playerid][pBody] = listitem+1;
  1422.             return ShowPlayerDialog(playerid, DIALOG_CREATION+19, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Roupas", "Digite abaixo o número da sua skin\n{FF0000}(OBS: Ela tem de ser maior que 8 e menor que 299!)", "Proceder", "Sair");
  1423.         }
  1424.         case DIALOG_CREATION+19:
  1425.         {
  1426.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATION+12, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Definição Corporal", "Muito Magro\nMagro\nEsbelto\nSarado\nBombado\nGordo\nMuito Gordo", "Ok", "Voltar");
  1427.             new skin = strval(inputtext);
  1428.             if(skin < 8 || skin > 299) return ShowPlayerDialog(playerid, 20, DIALOG_STYLE_INPUT, "Criação de Personagens || {FF0000}Roupas", "Digite abaixo o número da sua skin\n{FF0000}(OBS: Ela tem de ser maior que 8 e menor que 299!)", "Proceder", "Sair");
  1429.             PlayerInfo[playerid][pSkin] = skin;
  1430.             SetPlayerSkin(playerid, skin);
  1431.             return ShowPlayerDialog(playerid, DIALOG_CREATION+9, DIALOG_STYLE_LIST, "Criação de Personagens || {FF0000}Selecione agora como você veio para Los Santos", "De Barco\nDe Avião\nDe Trem\nNascido Aqui\nVeio Ilegalmente", "Proceder", "Sair");
  1432.         }
  1433.         case DIALOG_PLAYERDESCRIPTION:
  1434.         {
  1435.             if(!response) return 0;
  1436.             new textstr[256];
  1437.             new player;
  1438.             player = GetPVarInt(playerid, "PlayerSeen");
  1439.             switch (listitem)
  1440.             {
  1441.                 case 0:
  1442.                 {
  1443.                     new heighta, heightb;
  1444.                     if(PlayerInfo[player][pHeight] > 200) heighta = 2;
  1445.                     else heighta = 1;
  1446.                     if(PlayerInfo[player][pHeight] > 200) heightb = PlayerInfo[player][pHeight]-200;
  1447.                     else heightb = PlayerInfo[player][pHeight]-100;
  1448.                     format(textstr, 128, "A altura desta pessoa é:\n{FF0000}%d centímetros ou %d metro e %d centímetros.", PlayerInfo[player][pHeight],heighta, heightb);
  1449.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Altura", textstr, "OK", "Voltar");
  1450.                 }
  1451.                 case 1:
  1452.                 {
  1453.                     format(textstr, 128, "O peso desta pessoa é:\n{FF0000}%d kilogramas.", PlayerInfo[player][pWeight]);
  1454.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Peso", textstr, "OK", "Voltar");
  1455.                 }
  1456.                 case 2:
  1457.                 {
  1458.                     format(textstr, 256, "A pessoa tem as seguintes descrições de tatuagem:\n{FF0000}%s", PlayerInfo[player][pTatoo]);
  1459.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Tatuagens", textstr, "OK", "Voltar");
  1460.                 }
  1461.                 case 3:
  1462.                 {
  1463.                     new color[24];
  1464.                     switch (PlayerInfo[player][pHairColor])
  1465.                     {
  1466.                         case 1: color = "Louro";
  1467.                         case 2: color = "Castanho Bem Claro";
  1468.                         case 3: color = "Castanho Claro";
  1469.                         case 4: color = "Castanho";
  1470.                         case 5: color = "Castanho Escuro";
  1471.                         case 6: color = "Moreno";
  1472.                         case 7: color = "Preto";
  1473.                         case 8: color = "Azul";
  1474.                         case 9: color = "Rosa";
  1475.                         case 10: color = "Vermelho";
  1476.                         case 11: color = "Verde";
  1477.                         default: color = "Não definido";
  1478.                     }
  1479.                     format(textstr, 256, "A pessoa tem a seguinte cor de cabelo:\n%s.", color);
  1480.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Cor de Cabelo", textstr, "OK", "Voltar");
  1481.                 }
  1482.                 case 4:
  1483.                 {
  1484.                     new color[24];
  1485.                     switch (PlayerInfo[player][pSkinColor])
  1486.                     {
  1487.                         case 1: color = "Negra";
  1488.                         case 2: color = "Parda";
  1489.                         case 3: color = "Índia";
  1490.                         case 4: color = "Asiática";
  1491.                         case 5: color = "Árabe";
  1492.                         case 6: color = "Caucasiana";
  1493.                         case 7: color = "Albina";
  1494.                         default: color = "Não definida";
  1495.                     }
  1496.                     format(textstr, 256, "A pessoa tem a seguinte cor de pele:\n{FF0000}%s.", color);
  1497.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Cor de pele", textstr, "OK", "Voltar");
  1498.                 }
  1499.                 case 5:
  1500.                 {
  1501.                     new color[24];
  1502.                     switch (PlayerInfo[player][pBeard])
  1503.                     {
  1504.                         case 1: color = "Louro";
  1505.                         case 2: color = "Castanho Bem Claro";
  1506.                         case 3: color = "Castanho Claro";
  1507.                         case 4: color = "Castanho";
  1508.                         case 5: color = "Castanho Escuro";
  1509.                         case 6: color = "Moreno";
  1510.                         case 7: color = "Preto";
  1511.                         case 8: color = "Azul";
  1512.                         case 9: color = "Rosa";
  1513.                         case 10: color = "Vermelho";
  1514.                         case 11: color = "Verde";
  1515.                         case 12: color = "Não tem";
  1516.                         default: color = "Não definido";
  1517.                     }
  1518.                     format(textstr, 256, "A pessoa tem a seguinte cor de barba:\n{FF0000}%s.", color);
  1519.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Cor da Barba", textstr, "OK", "Voltar");
  1520.                 }
  1521.                 case 6:
  1522.                 {
  1523.                     format(textstr, 256, "A pessoa tem as seguintes descrições:\n{FF0000}%s", PlayerInfo[player][pCharDescription]);
  1524.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Tatuagens", textstr, "OK", "Voltar");
  1525.                 }
  1526.                 case 7:
  1527.                 {
  1528.                     new color[24];
  1529.                     switch (PlayerInfo[player][pEyeColor])
  1530.                     {
  1531.                         case 1: color = "Castanho Escuro";
  1532.                         case 2: color = "Castanho Claro";
  1533.                         case 3: color = "Verde";
  1534.                         case 4: color = "Azul";
  1535.                         default: color = "Não definido";
  1536.                     }
  1537.                     format(textstr, 256, "A pessoa tem a seguinte cor dos olhos:\n{FF0000}%s.", color);
  1538.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Cor dos Olhos", textstr, "OK", "Voltar");
  1539.                 }
  1540.                 case 8:
  1541.                 {
  1542.                     new color[24];
  1543.                     switch (PlayerInfo[player][pBody])
  1544.                     {
  1545.                         case 1: color = "Muito Magro";
  1546.                         case 2: color = "Magro";
  1547.                         case 3: color = "Esbelto";
  1548.                         case 4: color = "Sarado";
  1549.                         case 5: color = "Bombado";
  1550.                         case 6: color = "Gordo";
  1551.                         case 7: color = "Muito Gordo";
  1552.                         default: color = "Não definido";
  1553.                     }
  1554.                     format(textstr, 256, "A definição corporal da pessoa é:\n{FF0000}%s.", color);
  1555.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Definição Corporal", textstr, "OK", "Voltar");
  1556.                 }
  1557.                 case 9:
  1558.                 {
  1559.                     new color[24];
  1560.                     switch (PlayerInfo[player][pHairStyle])
  1561.                     {
  1562.                         case 1: color = "Colômbia";
  1563.                         case 2: color = "Black Power";
  1564.                         case 3: color = "Afro";
  1565.                         case 4: color = "Moicano";
  1566.                         case 5: color = "Moicano Punk";
  1567.                         case 6: color = "Arrepiado";
  1568.                         case 7: color = "Franjinha";
  1569.                         case 8: color = "Justin Bieber";
  1570.                         case 9: color = "Comprido";
  1571.                         case 10: color = "Careca";
  1572.                         case 11: color = "Ralinho";
  1573.                         case 12: color = "Flat Head";
  1574.                         default: color = "Não definido";
  1575.                     }
  1576.                     format(textstr, 256, "A pessoa tem o seguinte estilo de cabelo:\n{FF0000}%s.", color);
  1577.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Estilo/Corte de Cabelo", textstr, "OK", "Voltar");
  1578.                 }
  1579.                 case 10:
  1580.                 {
  1581.                     new color[24];
  1582.                     switch (PlayerInfo[player][pBeardStyle])
  1583.                     {
  1584.                         case 1: color = "Bigodinho";
  1585.                         case 2: color = "Bigodão";
  1586.                         case 3: color = "Barba Grande";
  1587.                         case 4: color = "Cavanhaque";
  1588.                         case 5: color = "Rasteira";
  1589.                         case 6: color = "Moustache";
  1590.                         case 7: color = "Sem Barba";
  1591.                         default: color = "Não definido";
  1592.                     }
  1593.                     format(textstr, 256, "A pessoa tem o seguinte estilo de barba:\n{FF0000}%s.", color);
  1594.                     return ShowPlayerDialog(playerid, DIALOG_CREATION+14, DIALOG_STYLE_MSGBOX, "Estilo/Corte da Barba", textstr, "OK", "Voltar");
  1595.                 }
  1596.             }
  1597.         }
  1598.     }
  1599.     return 1;
  1600. }
  1601.  
  1602. public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
  1603. {
  1604.     #if defined DEBUG
  1605.         format(_largestring, 1280, "[OnPlayerInteriorChange] \"%s\" - %d, %d, %d", ReturnPlayerNameEx(playerid), playerid, newinteriorid, oldinteriorid);
  1606.         DebugLog(_largestring);
  1607.     #endif
  1608.     PlayerInfo[playerid][pInt] = newinteriorid;
  1609.     PlayerInfo[playerid][pVirWorld] = GetPlayerVirtualWorld(playerid);
  1610.     return 1;
  1611. }
  1612.  
  1613. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1614. {
  1615.     #if defined DEBUG
  1616.         format(_largestring, 1280, "[OnPlayerKeyStateChange] \"%s\" - %d, %d, %d", ReturnPlayerNameEx(playerid), playerid, newkeys, oldkeys);
  1617.         DebugLog(_largestring);
  1618.     #endif
  1619.     if(newkeys == KEY_SECONDARY_ATTACK)
  1620.     {
  1621.         for(new i = 0; i < sizeof(BuildingInfo); i++)
  1622.         {
  1623.             if(IsPlayerInRangeOfPoint(playerid, 1,BuildingInfo[i][bEntrancex], BuildingInfo[i][bEntrancey], BuildingInfo[i][bEntrancez]))
  1624.             {
  1625.                 SetPlayerInterior(playerid, BuildingInfo[i][bInterior]);
  1626.                 SetPlayerVirtualWorld(playerid, BuildingInfo[i][bVW]);
  1627.                 SetPlayerPos(playerid,BuildingInfo[i][bExitx],BuildingInfo[i][bExity],BuildingInfo[i][bExitz]);
  1628.                 TogglePlayerControllable(playerid, 0);
  1629.                 SetPVarInt(playerid, "Frozen", 1);
  1630.                 SetTimerEx("Descongelar", 2000, 0, "i", playerid);
  1631.                 PlayerInfo[playerid][pInt] = BuildingInfo[i][bInterior];
  1632.                 PlayerInfo[playerid][pVirWorld] = BuildingInfo[i][bVW];
  1633.                 SetPVarInt(playerid, "BuildingEntered", i);
  1634.             }
  1635.             if(IsPlayerInRangeOfPoint(playerid,1,BuildingInfo[i][bExitx],BuildingInfo[i][bExity],BuildingInfo[i][bExitz]))
  1636.             {
  1637.                 SetPlayerInterior(playerid, BuildingInfo[i][bInterior]);
  1638.                 SetPlayerVirtualWorld(playerid, BuildingInfo[i][bVW]);
  1639.                 TogglePlayerControllable(playerid, 0);
  1640.                 SetPVarInt(playerid, "Frozen", 1);
  1641.                 SetTimerEx("Descongelar", 2000, 0, "i", playerid);
  1642.                 SetPlayerPos(playerid,BuildingInfo[i][bEntrancex],BuildingInfo[i][bEntrancey],BuildingInfo[i][bEntrancez]);
  1643.                 PlayerInfo[playerid][pInt] = BuildingInfo[i][bInterior];
  1644.                 PlayerInfo[playerid][pVirWorld] = BuildingInfo[i][bVW];
  1645.                 SetPVarInt(playerid, "BuildingEntered", MAX_BUILDINGS+1);
  1646.             }
  1647.         }
  1648.     }
  1649.     return 1;
  1650. }
  1651.  
  1652.  
  1653. public OnPlayerText(playerid, text[])
  1654. {
  1655.     #if defined DEBUG
  1656.         format(_largestring, 1280, "[OnPlayerText] \"%s\" - %d, \"%s\"", ReturnPlayerNameEx(playerid), playerid, text);
  1657.         DebugLog(_largestring);
  1658.     #endif
  1659.     new xstr[160];
  1660.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado."), 0;
  1661.     if(GetPVarInt(playerid, "ChatAnim"))
  1662.     {
  1663.         ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1);
  1664.     }
  1665.     if(GetPVarInt(playerid, "SotaqueOn"))
  1666.     {
  1667.         format(xstr, 128, "%s [Sotaque %s] diz: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  1668.         nearByMessage(playerid, COLOR_FADE1, xstr, 10.0);
  1669.     }
  1670.     else
  1671.     {
  1672.         format(xstr, 128, "%s diz: %s", ReturnPlayerNameEx(playerid), text);
  1673.         nearByMessage(playerid, COLOR_FADE1, xstr, 10.0);
  1674.     }
  1675.     SetPlayerChatBubble(playerid, xstr, 0xFFFFFFFF, 10, 15000);
  1676.     print(xstr);
  1677.     return 0;
  1678. }
  1679.  
  1680. public OnPlayerRequestClass(playerid, classid)
  1681. {
  1682.     #if defined DEBUG
  1683.         format(_largestring, 1280, "[OnPlayerRequestClass] \"%s\" - %d, %d", ReturnPlayerNameEx(playerid), playerid, classid);
  1684.         DebugLog(_largestring);
  1685.     #endif
  1686.     if (GetPVarInt(playerid, "RegistrationStep") == 0 && GetPVarInt(playerid, "PlayerLogged") != 1)
  1687.     {
  1688.         if (GetPVarInt(playerid, "PlayerAccount") != 0) { format(_largestring, 256, "Bem Vindo de volta, %s!\nDetectamos que você tem uma conta neste servidor!\nDigite a senha referente a este personagem abaixo:", ReturnPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Seu Servidor", _largestring, "Logar", "Sair"); }
  1689.         else { format(_largestring, 256, "Bem Vindo, %s!\nDetectamos que você não tem uma conta neste servidor!\nRegistre uma senha referente a este personagem abaixo para proceder:", ReturnPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Seu Servidor", _largestring, "Proceder", "Sair"); }
  1690.     }
  1691.     else SpawnPlayer(playerid);
  1692.     return 1;
  1693. }
  1694.  
  1695. public OnPlayerConnect(playerid)
  1696. {
  1697.     GetPlayerName(playerid, _playername, sizeof(_playername));
  1698.     new namestring = strfind(_playername, "_", true);
  1699.     if(namestring == -1)
  1700.     {
  1701.         SendClientMessage(playerid, COLOR_SYSTEM, "[SYS] ERRO! Seu nome não está no padrão aceito pelo nosso servidor!");
  1702.         SendClientMessage(playerid, COLOR_SYSTEM, "[SYS] Você deve seguir o formato: Nome_Sobrenome, exemplos: Jason_Crambell, Maxwell_Neiman.");
  1703.         Kick(playerid);
  1704.         return 1;
  1705.     }
  1706.     for(new i = 0; i < _:pInfo; i++)
  1707.     {
  1708.         PlayerInfo[playerid][pInfo: i] = 0;
  1709.     }
  1710.     SetPlayerColor(playerid,0x00000000);
  1711.     SendClientMessage(playerid, COLOR_SYSTEM, "[SYS] Carregando...");
  1712.     SetPVarInt(playerid, "BuildingEntered", MAX_BUILDINGS+1);
  1713.     if(INI_Exist(playerid))
  1714.     {
  1715.         SetPVarInt(playerid, "PlayerAccount", 1);
  1716.     }
  1717.     else
  1718.     {
  1719.         SetPVarInt(playerid, "PlayerAccount", 0);
  1720.     }
  1721.     return 1;
  1722. }
  1723.  
  1724. public OnPlayerDisconnect(playerid, reason)
  1725. {
  1726.     DeletePVar(playerid, "Logged");
  1727.     new Float:X, Float:Y, Float:Z;
  1728.     GetPlayerPos(playerid, X, Y, Z);
  1729.     PlayerInfo[playerid][pPos][0] = X;
  1730.     PlayerInfo[playerid][pPos][1] = Y;
  1731.     PlayerInfo[playerid][pPos][2] = Z;
  1732.     if(!GMXSet) { OnPlayerUpdateEx(playerid); }
  1733.     switch (reason)
  1734.     {
  1735.         case 0:
  1736.         {
  1737.             _playername = ReturnPlayerNameEx(playerid);
  1738.             format(_string, 128, "[SYS] Jogador {C2A2DA}%s{A9C4E4}[%d] saiu do servidor. Motivo: {C2A2DA}Crash.", _playername, playerid);
  1739.             nearByMessage(playerid, COLOR_SYSTEM, _string);
  1740.         }
  1741.         case 1:
  1742.         {
  1743.             _playername = ReturnPlayerNameEx(playerid);
  1744.             format(_string, 128, "[SYS] Jogador {C2A2DA}%s{A9C4E4}[%d] saiu do servidor. Motivo: {C2A2DA}Saiu por contra própria. (/q).", _playername, playerid);
  1745.             nearByMessage(playerid, COLOR_SYSTEM, _string);
  1746.         }
  1747.         case 2:
  1748.         {
  1749.             _playername = ReturnPlayerNameEx(playerid);
  1750.             format(_string, 128, "[SYS] Jogador {C2A2DA}%s{A9C4E4}[%d] saiu do servidor. Motivo: {C2A2DA}Kickado ou Banido.", _playername, playerid);
  1751.             nearByMessage(playerid, COLOR_SYSTEM, _string);
  1752.         }
  1753.         default:
  1754.         {
  1755.             _playername = ReturnPlayerNameEx(playerid);
  1756.             format(_string, 128, "[SYS] Jogador {C2A2DA}%s{A9C4E4}[%d] saiu do servidor. Motivo: {C2A2DA}Crash.", _playername, playerid);
  1757.             nearByMessage(playerid, COLOR_SYSTEM, _string);
  1758.         }
  1759.     }
  1760.     return 1;
  1761. }
  1762.  
  1763. public OnPlayerDeath(playerid, killerid, reason)
  1764. {
  1765.     _otherplayername = ReturnPlayerNameEx(killerid);
  1766.     _playername = ReturnPlayerNameEx(playerid);
  1767.     format(_string, 128, "[!] %s [%d] matou %s [%d] com a arma %s [%d].", _otherplayername, killerid, _playername, playerid, ReturnWeaponName(reason), reason);
  1768.     AdminWarning(COLOR_WARNING, _string,  1);
  1769.     nearByMessage(playerid, COLOR_PURPLE, _string, 20.0);
  1770.     SetPlayerColor(playerid,0);
  1771.     return 1;
  1772. }
  1773.  
  1774. public OnPlayerSpawn(playerid)
  1775. {
  1776.     #if defined DEBUG
  1777.         format(_largestring, 1280, "[OnPlayerSpawn] \"%s\"", ReturnPlayerNameEx(playerid));
  1778.         DebugLog(_largestring);
  1779.     #endif
  1780.     SetPlayerSkillLevel(playerid, 0, PlayerInfo[playerid][pPISTOL]);
  1781.     SetPlayerSkillLevel(playerid, 1, PlayerInfo[playerid][pPISTOL_SILENCED]);
  1782.     SetPlayerSkillLevel(playerid, 2, PlayerInfo[playerid][pDESERT_EAGLE]);
  1783.     SetPlayerSkillLevel(playerid, 3, PlayerInfo[playerid][pSHOTGUN]);
  1784.     SetPlayerSkillLevel(playerid, 4, PlayerInfo[playerid][pSAWNOFF_SHOTGUN]);
  1785.     SetPlayerSkillLevel(playerid, 5, PlayerInfo[playerid][pSPAS12_SHOTGUN]);
  1786.     SetPlayerSkillLevel(playerid, 6, PlayerInfo[playerid][pMICRO_UZI]);
  1787.     SetPlayerSkillLevel(playerid, 2, PlayerInfo[playerid][pMP5]);
  1788.     SetPlayerSkillLevel(playerid, 3, PlayerInfo[playerid][pAK47]);
  1789.     SetPlayerSkillLevel(playerid, 4, PlayerInfo[playerid][pM4]);
  1790.     SetPlayerSkillLevel(playerid, 5, PlayerInfo[playerid][pSNIPERRIFLE]);
  1791.     SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  1792.     SetPlayerSpawn(playerid);
  1793.     TogglePlayerControllable(playerid, 0);
  1794.     SetPVarInt(playerid, "Frozen", 1);
  1795.     SetTimerEx("Descongelar", 2000, 0, "i", playerid);
  1796.     return 1;
  1797. }
  1798.  
  1799. stock ShowStats(playerid,targetid)
  1800. {
  1801.     if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  1802.     {
  1803.         new atext[7];
  1804.         if(PlayerInfo[targetid][pSex] == 1) { atext = "Homem"; }
  1805.         else if(PlayerInfo[targetid][pSex] == 2) { atext = "Mulher"; }
  1806.         new ftext[24];
  1807.         if(PlayerInfo[targetid][pFaction] != 0) { ftext = FactionInfo[PlayerInfo[targetid][pFaction]][fName]; }
  1808.         else { ftext = "Nenhuma"; }
  1809.         new rtext[24];
  1810.         new age = PlayerInfo[targetid][pAge];
  1811.         new y = PlayerInfo[targetid][pYearsOn];
  1812.         new m = PlayerInfo[targetid][pMonthsOn];
  1813.         new d = PlayerInfo[targetid][pDaysOn];
  1814.         new h = PlayerInfo[targetid][pHoursOn];
  1815.         new mm = PlayerInfo[targetid][pMinutesOn];
  1816.         new s = PlayerInfo[targetid][pSecondsOn];
  1817.         new level = PlayerInfo[targetid][pLevel];
  1818.         new exp = PlayerInfo[targetid][pExp];
  1819.         new nxtlevel = PlayerInfo[targetid][pLevel]+1;
  1820.         new expamount = nxtlevel*3;
  1821.         new intir = PlayerInfo[targetid][pInt];
  1822.         new virworld = PlayerInfo[targetid][pVirWorld];
  1823.         new Float:health;
  1824.         _playername = ReturnPlayerNameEx(targetid);
  1825.         GetPlayerHealth(targetid,health);
  1826.         SendClientMessage(playerid, COLOR_MAROON, "[|===========================================================|]");
  1827.         format(_string, sizeof(_string), "Nível: [%d] || Sexo: [%s] || Idade: [%d] || Experiência: [%d/%d]", level,atext,age,exp,expamount);
  1828.         SendClientMessage(playerid, COLOR_CHARTREUSE, _string);
  1829.         format(_string, sizeof(_string), "Organização: [%s] || Cargo: [%s]", ftext,rtext);
  1830.         SendClientMessage(playerid, COLOR_MAROON, _string);
  1831.         if(d > 0) format(_string, sizeof(_string), "Interior: [%d] Virtual World: [%d] || Tempo Jogando: [%d dias] - [%02dh:%02dmin:%02dseg]",intir,virworld, d, h, mm, s);
  1832.         else if(m > 0) format(_string, sizeof(_string), "Interior: [%d] Virtual World: [%d] || Tempo Jogando: [%d meses/%d dias] - [%02dh:%02dmin:%02dseg]",intir,virworld, m, d, h, mm, s);
  1833.         else if(y > 0) format(_string, sizeof(_string), "Interior: [%d] Virtual World: [%d] || Tempo Jogando: [%d anos/%d meses/%d dias] - [%02dh:%02dmin:%02dseg]",intir,virworld, y, m, d, h, mm, s);
  1834.         else format(_string, sizeof(_string), "Interior: [%d] Virtual World: [%d] || Tempo Jogando: [%02dh:%02dmin:%02dseg]",intir,virworld, h, mm, s);
  1835.         SendClientMessage(playerid, COLOR_CHARTREUSE, _string);
  1836.         SendClientMessage(playerid, COLOR_MAROON, "[|===========================================================|]");
  1837.     }
  1838.     return 1;
  1839. }
  1840.  
  1841. public OnGameModeInit()
  1842. {
  1843.     AddPlayerClass(299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  1844.     ManualVehicleEngineAndLights();
  1845.     for(new i = 0; i < sizeof(CarInfo); i++)
  1846.     {
  1847.         new b[32];
  1848.         format(b, sizeof (b), "Carros/Veiculo %d.ini", i);
  1849.         INI_ParseFile(b, "LoadCarEx", false, true, i);
  1850.     }
  1851.     LoadWeapons();
  1852.     LoadBuildings();
  1853.     LoadFactions();
  1854.     SetGameModeText(SCRIPT_VERSION);
  1855.     SendRconCommand("hostname Seu Servidor Aqui");
  1856.     SendRconCommand("mapname Los Santos");
  1857.     SendRconCommand("weburl Sem Site");
  1858.     gettime(ghour, gmin, gsec);
  1859.     ghour = shifthour;
  1860.     SetWorldTime(ghour);
  1861.     SetNameTagDrawDistance(10.0);
  1862.     AllowInteriorWeapons(1);
  1863.     DisableInteriorEnterExits();
  1864.     EnableStuntBonusForAll(0);
  1865.     new bc, cc;
  1866.     for(new h = 0; h < sizeof(CarInfo); h++)
  1867.     {
  1868.         if(CarInfo[h][cModel] > 400)
  1869.         {
  1870.             AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
  1871.             new alarm, doors, bonnet, boot, objective;
  1872.             SetVehicleParamsEx(h, false, false, alarm, doors, bonnet, boot, objective);
  1873.             SetVehicleNumberPlate(h, " ");
  1874.             SetVehicleVirtualWorld(h, CarInfo[h][cVW]);
  1875.             LinkVehicleToInterior(h, CarInfo[h][cInt]);
  1876.             cc++;
  1877.         }
  1878.     }
  1879.     for(new h = 0; h < sizeof(BuildingInfo); h++)
  1880.     {
  1881.         if(BuildingInfo[h][bName] != 0)
  1882.         {
  1883.             DestroyDynamic3DTextLabel(BuildingLabel[h]);
  1884.             DestroyDynamicPickup(BuildingPickUp[h]);
  1885.             format(_string, sizeof(_string), "[%s]\n[|Aperte F ou ENTER para entrar.|]",BuildingInfo[h][bName]);
  1886.             BuildingPickUp[h] = CreateDynamicPickup(1559, 1, BuildingInfo[h][bEntrancex], BuildingInfo[h][bEntrancey], BuildingInfo[h][bEntrancez]);
  1887.             BuildingLabel[h] = CreateDynamic3DTextLabel(_string,COLOR_SYSTEM,BuildingInfo[h][bEntrancex], BuildingInfo[h][bEntrancey], BuildingInfo[h][bEntrancez],15);
  1888.             bc++;
  1889.         }
  1890.     }
  1891.     printf("[SYS]: %d veículos no servidor.",cc);
  1892.     printf("[SYS]: %d interiores no servidor.",bc);
  1893.     printf("[SYS]: %d pickups no servidor carregados.",CountDynamicPickups());
  1894.     new tmphour;
  1895.     new tmpminute;
  1896.     new tmpsecond;
  1897.     gettime(tmphour, tmpminute, tmpsecond);
  1898.     FixHour(tmphour);
  1899.     tmphour = shifthour;
  1900.     SetWorldTime(tmphour);
  1901.     SetTimer("GlobalPlayerLoop", 1000, 1);
  1902.     return 1;
  1903. }
  1904.  
  1905. stock FixHour(hour)
  1906. {
  1907.     hour = timeshift+hour;
  1908.     if (hour < 0)
  1909.     {
  1910.         hour = hour+24;
  1911.     }
  1912.     else if (hour > 23)
  1913.     {
  1914.         hour = hour-24;
  1915.     }
  1916.     shifthour = hour;
  1917.     return 1;
  1918. }
  1919.  
  1920.  
  1921. stock SyncTime()
  1922. {
  1923.     //new string[64];
  1924.     new tmphour;
  1925.     new tmpminute;
  1926.     new tmpsecond;
  1927.     gettime(tmphour, tmpminute, tmpsecond);
  1928.     tmphour = shifthour;
  1929.     if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
  1930.     {
  1931.         ghour = tmphour;
  1932.         SetWorldTime(tmphour);
  1933.     }
  1934. }
  1935.  
  1936. forward SaveAccounts();
  1937.  
  1938. public SaveAccounts()
  1939. {
  1940.     foreach(Player, i)
  1941.     {
  1942.         if(IsPlayerConnected(i))
  1943.         {
  1944.             new Float:X, Float:Y, Float:Z;
  1945.             GetPlayerPos(i, X, Y, Z);
  1946.             PlayerInfo[i][pPos][0] = X;
  1947.             PlayerInfo[i][pPos][1] = Y;
  1948.             PlayerInfo[i][pPos][2] = Z;
  1949.             OnPlayerUpdateEx(i);
  1950.         }
  1951.     }
  1952. }
  1953.  
  1954. public GlobalPlayerLoop()
  1955. {
  1956.     gametime++;
  1957.     foreach(Player, i)
  1958.     {
  1959.         new reporttime = GetPVarInt(i, "ReportTime");
  1960.         if(reporttime > 0) SetPVarInt(i, "ReportTime", reporttime--);
  1961.         else
  1962.         {
  1963.             DeletePVar(i, "ReportTime");
  1964.         }
  1965.         if(gametime == 3600)
  1966.         {
  1967.             if(PlayerInfo[i][pLevel] > 0)
  1968.             {
  1969.                 SendClientMessage(i, COLOR_MAROON, "[!] Você ganhou experiência!");
  1970.                 PlayerInfo[i][pExp]++;
  1971.             }
  1972.         }
  1973.         PlayerInfo[i][pSecondsOn]++;
  1974.         if(PlayerInfo[i][pSecondsOn] > 59)
  1975.         {
  1976.             PlayerInfo[i][pSecondsOn] = 0;
  1977.             PlayerInfo[i][pMinutesOn]++;
  1978.             if(PlayerInfo[i][pMinutesOn] > 59)
  1979.             {
  1980.                 PlayerInfo[i][pMinutesOn] = 0;
  1981.                 PlayerInfo[i][pHoursOn]++;
  1982.                 if(PlayerInfo[i][pHoursOn] > 24)
  1983.                 {
  1984.                     PlayerInfo[i][pHoursOn] = 0;
  1985.                     PlayerInfo[i][pDaysOn]++;
  1986.                     if(PlayerInfo[i][pDaysOn] > 30)
  1987.                     {
  1988.                         if(PlayerInfo[i][pDaysOn] > 24)
  1989.                         {
  1990.                             PlayerInfo[i][pDaysOn] = 0;
  1991.                             PlayerInfo[i][pMonthsOn]++;
  1992.                             if(PlayerInfo[i][pMonthsOn] > 12)
  1993.                             {
  1994.                                 PlayerInfo[i][pMonthsOn] = 0;
  1995.                                 PlayerInfo[i][pYearsOn]++;
  1996.                             }
  1997.                         }
  1998.                     }
  1999.                 }
  2000.             }
  2001.         }
  2002.     }
  2003.     if(gametime == 3600)
  2004.     {
  2005.         SyncTime();
  2006.         SaveAccounts();
  2007.         gametime = 0;
  2008.     }
  2009.     return 1;
  2010. }
  2011.  
  2012. //==============[PLAYER-RELATED SAVING/LOADING/LOGGING FUNCTIONS]===============
  2013.  
  2014. public OnPlayerRegister(playerid, pass[])
  2015. {
  2016.     #if defined DEBUG
  2017.         format(_largestring, 1280, "[OnPlayerRegister] \"%s\"", ReturnPlayerNameEx(playerid));
  2018.         DebugLog(_largestring);
  2019.     #endif
  2020.     new nome[MAX_PLAYER_NAME];
  2021.     GetPlayerName(playerid, nome, MAX_PLAYER_NAME);
  2022.     new userFile[32];
  2023.     format(userFile, sizeof (userFile), "Contas/%s.ini", nome);
  2024.     new INI:file = INI_Open(userFile);
  2025.     SetPVarString(playerid, "PassW", pass);
  2026.     GetPVarString(playerid, "PassW", PlayerInfo[playerid][pKey], 24);
  2027.     INI_WriteString(file, "Key", PlayerInfo[playerid][pKey]);
  2028.     INI_WriteString(file, "RealName",PlayerInfo[playerid][pRealName]);
  2029.     INI_WriteInt(file, "Height",PlayerInfo[playerid][pHeight]);
  2030.     INI_WriteInt(file, "Weight",PlayerInfo[playerid][pWeight]);
  2031.     INI_WriteString(file, "Tatoos",PlayerInfo[playerid][pTatoo]);
  2032.     INI_WriteInt(file, "SkinColor",PlayerInfo[playerid][pSkinColor]);
  2033.     INI_WriteInt(file, "HairColor",PlayerInfo[playerid][pHairColor]);
  2034.     INI_WriteInt(file, "EyeColor",PlayerInfo[playerid][pEyeColor]);
  2035.     INI_WriteInt(file, "Beard",PlayerInfo[playerid][pBeard]);
  2036.     INI_WriteInt(file, "BeardStyle",PlayerInfo[playerid][pBeardStyle]);
  2037.     INI_WriteInt(file, "HairStyle",PlayerInfo[playerid][pHairStyle]);
  2038.     INI_WriteString(file, "CharDescription",PlayerInfo[playerid][pCharDescription]);
  2039.     INI_WriteInt(file, "Body",PlayerInfo[playerid][pBody]);
  2040.     INI_WriteInt(file, "Level",PlayerInfo[playerid][pLevel]);
  2041.     INI_WriteInt(file, "AdminLevel",PlayerInfo[playerid][pAdmin]);
  2042.     INI_WriteInt(file, "Registered",PlayerInfo[playerid][pReg]);
  2043.     INI_WriteInt(file, "Sex",PlayerInfo[playerid][pSex]);
  2044.     INI_WriteInt(file, "Age",PlayerInfo[playerid][pAge]);
  2045.     INI_WriteString(file, "Origin",PlayerInfo[playerid][pOrigin]);
  2046.     INI_WriteInt(file, "CK",PlayerInfo[playerid][pCK]);
  2047.     INI_WriteInt(file, "Respect",PlayerInfo[playerid][pExp]);
  2048.     INI_WriteInt(file, "Kills",PlayerInfo[playerid][pKills]);
  2049.     INI_WriteInt(file, "Deaths",PlayerInfo[playerid][pDeaths]);
  2050.     INI_WriteInt(file, "Faction",PlayerInfo[playerid][pFaction]);
  2051.     INI_WriteInt(file, "Rank",PlayerInfo[playerid][pRank]);
  2052.     INI_WriteInt(file, "Skin",PlayerInfo[playerid][pSkin]);
  2053.     GetPlayerArmour(playerid,PlayerInfo[playerid][pArmor]);
  2054.     INI_WriteFloat(file, "pColete",PlayerInfo[playerid][pArmor]);
  2055.     GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
  2056.     INI_WriteFloat(file, "pHealth",PlayerInfo[playerid][pHealth]);
  2057.     INI_WriteInt(file, "Int",PlayerInfo[playerid][pInt]);
  2058.     INI_WriteFloat(file, "Pos_X",PlayerInfo[playerid][pPos][0]);
  2059.     INI_WriteFloat(file, "Pos_Y",PlayerInfo[playerid][pPos][1]);
  2060.     INI_WriteFloat(file, "Pos_Z",PlayerInfo[playerid][pPos][2]);
  2061.     INI_WriteInt(file, "Gun1",PlayerInfo[playerid][pGun1]);
  2062.     INI_WriteInt(file, "Gun2",PlayerInfo[playerid][pGun2]);
  2063.     INI_WriteInt(file, "Gun3",PlayerInfo[playerid][pGun3]);
  2064.     INI_WriteInt(file, "Ammo1",PlayerInfo[playerid][pAmmo1]);
  2065.     INI_WriteInt(file, "Ammo2",PlayerInfo[playerid][pAmmo2]);
  2066.     INI_WriteInt(file, "Ammo3",PlayerInfo[playerid][pAmmo3]);
  2067.     INI_WriteInt(file, "Tutorial",PlayerInfo[playerid][pTut]);
  2068.     INI_WriteString(file, "RadioAlias",PlayerInfo[playerid][pRadioAlias]);
  2069.     INI_WriteString(file, "OfficialAlias",PlayerInfo[playerid][pOfficialAlias]);
  2070.     INI_WriteInt(file, "Warnings",PlayerInfo[playerid][pWarns]);
  2071.     INI_WriteInt(file, "VirWorld",PlayerInfo[playerid][pVirWorld]);
  2072.     INI_WriteInt(file, "Fuel",PlayerInfo[playerid][pFuel]);
  2073.     INI_WriteString(file, "Sotaque",PlayerInfo[playerid][pSotaque]);
  2074.     INI_WriteInt(file, "PistolSkill",PlayerInfo[playerid][pPISTOL]);
  2075.     INI_WriteInt(file, "SilencedSkill",PlayerInfo[playerid][pPISTOL_SILENCED]);
  2076.     INI_WriteInt(file, "DesertSkill",PlayerInfo[playerid][pDESERT_EAGLE]);
  2077.     INI_WriteInt(file, "ShotgunSkill",PlayerInfo[playerid][pSHOTGUN]);
  2078.     INI_WriteInt(file, "SawnoffSkill",PlayerInfo[playerid][pSAWNOFF_SHOTGUN]);
  2079.     INI_WriteInt(file, "SpasSkill",PlayerInfo[playerid][pSPAS12_SHOTGUN]);
  2080.     INI_WriteInt(file, "UziSkill",PlayerInfo[playerid][pMICRO_UZI]);
  2081.     INI_WriteInt(file, "MP5Skill",PlayerInfo[playerid][pMP5]);
  2082.     INI_WriteInt(file, "AK47Skill",PlayerInfo[playerid][pAK47]);
  2083.     INI_WriteInt(file, "M4Skill",PlayerInfo[playerid][pM4]);
  2084.     INI_WriteInt(file, "SniperSkill",PlayerInfo[playerid][pSNIPERRIFLE]);
  2085.     INI_WriteInt(file, "AnosOnline", PlayerInfo[playerid][pYearsOn]);
  2086.     INI_WriteInt(file, "MesesOnline", PlayerInfo[playerid][pMonthsOn]);
  2087.     INI_WriteInt(file, "DiasOnline", PlayerInfo[playerid][pDaysOn]);
  2088.     INI_WriteInt(file, "HorasOnline", PlayerInfo[playerid][pHoursOn]);
  2089.     INI_WriteInt(file, "MinutosOnline", PlayerInfo[playerid][pMinutesOn]);
  2090.     INI_WriteInt(file, "SegundosOnline", PlayerInfo[playerid][pSecondsOn]);
  2091.     INI_Close(file);
  2092.     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Seu servidor", "Você acaba de criar uma conta neste servidor!\nDigite a senha que você registrou agora.", "Logar", "Sair");
  2093.     return 1;
  2094. }
  2095.  
  2096. public OnPlayerUpdateEx(playerid)
  2097. {
  2098.     #if defined DEBUG
  2099.         format(_largestring, 1280, "[OnPlayerUpdateEx] \"%s\"", ReturnPlayerNameEx(playerid));
  2100.         DebugLog(_largestring);
  2101.     #endif
  2102.     new nome[MAX_PLAYER_NAME];
  2103.     GetPlayerName(playerid, nome, MAX_PLAYER_NAME);
  2104.     new userFile[32];
  2105.     format(userFile, sizeof (userFile), "Contas/%s.ini", nome);
  2106.     new INI:file = INI_Open(userFile);
  2107.         INI_WriteString(file, "Key", PlayerInfo[playerid][pKey]);
  2108.     INI_WriteString(file, "RealName",PlayerInfo[playerid][pRealName]);
  2109.     INI_WriteInt(file, "Height",PlayerInfo[playerid][pHeight]);
  2110.     INI_WriteInt(file, "Weight",PlayerInfo[playerid][pWeight]);
  2111.     INI_WriteString(file, "Tatoos",PlayerInfo[playerid][pTatoo]);
  2112.     INI_WriteInt(file, "SkinColor",PlayerInfo[playerid][pSkinColor]);
  2113.     INI_WriteInt(file, "HairColor",PlayerInfo[playerid][pHairColor]);
  2114.     INI_WriteInt(file, "EyeColor",PlayerInfo[playerid][pEyeColor]);
  2115.     INI_WriteInt(file, "Beard",PlayerInfo[playerid][pBeard]);
  2116.     INI_WriteInt(file, "BeardStyle",PlayerInfo[playerid][pBeardStyle]);
  2117.     INI_WriteInt(file, "HairStyle",PlayerInfo[playerid][pHairStyle]);
  2118.     INI_WriteString(file, "CharDescription",PlayerInfo[playerid][pCharDescription]);
  2119.     INI_WriteInt(file, "Body",PlayerInfo[playerid][pBody]);
  2120.     INI_WriteInt(file, "Level",PlayerInfo[playerid][pLevel]);
  2121.     INI_WriteInt(file, "AdminLevel",PlayerInfo[playerid][pAdmin]);
  2122.     INI_WriteInt(file, "Registered",PlayerInfo[playerid][pReg]);
  2123.     INI_WriteInt(file, "Sex",PlayerInfo[playerid][pSex]);
  2124.     INI_WriteInt(file, "Age",PlayerInfo[playerid][pAge]);
  2125.     INI_WriteString(file, "Origin",PlayerInfo[playerid][pOrigin]);
  2126.     INI_WriteInt(file, "CK",PlayerInfo[playerid][pCK]);
  2127.     INI_WriteInt(file, "Respect",PlayerInfo[playerid][pExp]);
  2128.     INI_WriteInt(file, "Kills",PlayerInfo[playerid][pKills]);
  2129.     INI_WriteInt(file, "Deaths",PlayerInfo[playerid][pDeaths]);
  2130.     INI_WriteInt(file, "Faction",PlayerInfo[playerid][pFaction]);
  2131.     INI_WriteInt(file, "Rank",PlayerInfo[playerid][pRank]);
  2132.     INI_WriteInt(file, "Skin",PlayerInfo[playerid][pSkin]);
  2133.     GetPlayerArmour(playerid,PlayerInfo[playerid][pArmor]);
  2134.     INI_WriteFloat(file, "pColete",PlayerInfo[playerid][pArmor]);
  2135.     GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
  2136.     INI_WriteFloat(file, "pHealth",PlayerInfo[playerid][pHealth]);
  2137.     INI_WriteInt(file, "Int",PlayerInfo[playerid][pInt]);
  2138.     INI_WriteFloat(file, "Pos_X",PlayerInfo[playerid][pPos][0]);
  2139.     INI_WriteFloat(file, "Pos_Y",PlayerInfo[playerid][pPos][1]);
  2140.     INI_WriteFloat(file, "Pos_Z",PlayerInfo[playerid][pPos][2]);
  2141.     INI_WriteInt(file, "Gun1",PlayerInfo[playerid][pGun1]);
  2142.     INI_WriteInt(file, "Gun2",PlayerInfo[playerid][pGun2]);
  2143.     INI_WriteInt(file, "Gun3",PlayerInfo[playerid][pGun3]);
  2144.     INI_WriteInt(file, "Ammo1",PlayerInfo[playerid][pAmmo1]);
  2145.     INI_WriteInt(file, "Ammo2",PlayerInfo[playerid][pAmmo2]);
  2146.     INI_WriteInt(file, "Ammo3",PlayerInfo[playerid][pAmmo3]);
  2147.     INI_WriteInt(file, "Tutorial",PlayerInfo[playerid][pTut]);
  2148.     INI_WriteString(file, "RadioAlias",PlayerInfo[playerid][pRadioAlias]);
  2149.     INI_WriteString(file, "OfficialAlias",PlayerInfo[playerid][pOfficialAlias]);
  2150.     INI_WriteInt(file, "Warnings",PlayerInfo[playerid][pWarns]);
  2151.     INI_WriteInt(file, "VirWorld",PlayerInfo[playerid][pVirWorld]);
  2152.     INI_WriteInt(file, "Fuel",PlayerInfo[playerid][pFuel]);
  2153.     INI_WriteString(file, "Sotaque",PlayerInfo[playerid][pSotaque]);
  2154.     INI_WriteInt(file, "PistolSkill",PlayerInfo[playerid][pPISTOL]);
  2155.     INI_WriteInt(file, "SilencedSkill",PlayerInfo[playerid][pPISTOL_SILENCED]);
  2156.     INI_WriteInt(file, "DesertSkill",PlayerInfo[playerid][pDESERT_EAGLE]);
  2157.     INI_WriteInt(file, "ShotgunSkill",PlayerInfo[playerid][pSHOTGUN]);
  2158.     INI_WriteInt(file, "SawnoffSkill",PlayerInfo[playerid][pSAWNOFF_SHOTGUN]);
  2159.     INI_WriteInt(file, "SpasSkill",PlayerInfo[playerid][pSPAS12_SHOTGUN]);
  2160.     INI_WriteInt(file, "UziSkill",PlayerInfo[playerid][pMICRO_UZI]);
  2161.     INI_WriteInt(file, "MP5Skill",PlayerInfo[playerid][pMP5]);
  2162.     INI_WriteInt(file, "AK47Skill",PlayerInfo[playerid][pAK47]);
  2163.     INI_WriteInt(file, "M4Skill",PlayerInfo[playerid][pM4]);
  2164.     INI_WriteInt(file, "SniperSkill",PlayerInfo[playerid][pSNIPERRIFLE]);
  2165.     INI_WriteInt(file, "AnosOnline", PlayerInfo[playerid][pYearsOn]);
  2166.     INI_WriteInt(file, "MesesOnline", PlayerInfo[playerid][pMonthsOn]);
  2167.     INI_WriteInt(file, "DiasOnline", PlayerInfo[playerid][pDaysOn]);
  2168.     INI_WriteInt(file, "HorasOnline", PlayerInfo[playerid][pHoursOn]);
  2169.     INI_WriteInt(file, "MinutosOnline", PlayerInfo[playerid][pMinutesOn]);
  2170.     INI_WriteInt(file, "SegundosOnline", PlayerInfo[playerid][pSecondsOn]);
  2171.     INI_Close(file);
  2172.     return 1;
  2173. }
  2174.  
  2175. public OnPlayerLoginEx(playerid, name[], value[])
  2176. {
  2177.     #if defined DEBUG
  2178.         format(_largestring, 1280, "[OnPlayerLoginEx] \"%s\"", ReturnPlayerNameEx(playerid));
  2179.         DebugLog(_largestring);
  2180.     #endif
  2181.     if(!strcmp(name, "Key"))
  2182.     {
  2183.         new cameo[24];
  2184.         strmid(cameo, value, 0, 255);
  2185.         PlayerInfo[playerid][pKey] = cameo;
  2186.     }
  2187.     if(!strcmp("RealName", name)) {  strmid(PlayerInfo[playerid][pRealName], value, 0, strlen(value), 255); }
  2188.     if(!strcmp("Height", name)) {  PlayerInfo[playerid][pHeight] = strval( value ); }
  2189.     if(!strcmp("Weight", name)) {  PlayerInfo[playerid][pWeight] = strval( value ); }
  2190.     if(!strcmp("Tatoos", name)) {  strmid(PlayerInfo[playerid][pTatoo], value, 0, strlen(value), 255); }
  2191.     if(!strcmp("SkinColor", name)) {  PlayerInfo[playerid][pSkinColor] = strval( value ); }
  2192.     if(!strcmp("HairColor", name)) {  PlayerInfo[playerid][pHairColor] = strval( value ); }
  2193.     if(!strcmp("EyeColor", name)) {  PlayerInfo[playerid][pEyeColor] = strval( value ); }
  2194.     if(!strcmp("Beard", name)) {  PlayerInfo[playerid][pBeard] = strval( value ); }
  2195.     if(!strcmp("BeardStyle", name)) {  PlayerInfo[playerid][pBeardStyle] = strval( value ); }
  2196.     if(!strcmp("HairStyle", name)) {  PlayerInfo[playerid][pHairStyle] = strval( value ); }
  2197.     if(!strcmp("CharDescription", name)) {  strmid(PlayerInfo[playerid][pCharDescription], value, 0, strlen(value), 255); }
  2198.     if(!strcmp("Body", name)) {  PlayerInfo[playerid][pBody] = strval( value ); }
  2199.     if(!strcmp("Level", name)) {  PlayerInfo[playerid][pLevel] = strval( value ); }
  2200.     if(!strcmp("AdminLevel", name)) {  PlayerInfo[playerid][pAdmin] = strval( value ); }
  2201.     if(!strcmp("Registered", name)) {  PlayerInfo[playerid][pReg] = strval( value ); }
  2202.     if(!strcmp("Sex", name)) {  PlayerInfo[playerid][pSex] = strval( value ); }
  2203.     if(!strcmp("Age", name)) {  PlayerInfo[playerid][pAge] = strval( value ); }
  2204.     if(!strcmp("Origin", name)) {  strmid(PlayerInfo[playerid][pOrigin], value, 0, strlen(value), 255); }
  2205.     if(!strcmp("CK", name)) {  PlayerInfo[playerid][pCK] = strval( value ); }
  2206.     if(!strcmp("Tutorial", name)) {  PlayerInfo[playerid][pTut] = strval( value ); }
  2207.     if(!strcmp("Kills", name)) {  PlayerInfo[playerid][pKills] = strval( value ); }
  2208.     if(!strcmp("Deaths", name)) {  PlayerInfo[playerid][pDeaths] = strval( value ); }
  2209.     if(!strcmp("Faction", name)) {  PlayerInfo[playerid][pFaction] = strval( value ); }
  2210.     if(!strcmp("Rank", name)) {  PlayerInfo[playerid][pRank] = strval( value ); }
  2211.     if(!strcmp("Skin", name)) {  PlayerInfo[playerid][pSkin] = strval( value ); }
  2212.     if(!strcmp("pColete", name)) {  PlayerInfo[playerid][pArmor] = floatstr( value ); }
  2213.     if(!strcmp("pHealth", name)) {  PlayerInfo[playerid][pHealth] = floatstr( value ); }
  2214.     if(!strcmp("Int", name)) {  PlayerInfo[playerid][pInt] = strval( value ); }
  2215.     if(!strcmp("Pos_X", name)) {  PlayerInfo[playerid][pPos][0] = floatstr( value ); }
  2216.     if(!strcmp("Pos_Y", name)) {  PlayerInfo[playerid][pPos][1] = floatstr( value ); }
  2217.     if(!strcmp("Pos_Z", name)) {  PlayerInfo[playerid][pPos][2] = floatstr( value ); }
  2218.     if(!strcmp("Gun1", name)) {  PlayerInfo[playerid][pGun1] = strval( value ); }
  2219.     if(!strcmp("Gun2", name)) {  PlayerInfo[playerid][pGun2] = strval( value ); }
  2220.     if(!strcmp("Gun3", name)) {  PlayerInfo[playerid][pGun3] = strval( value ); }
  2221.     if(!strcmp("Ammo1", name)) {  PlayerInfo[playerid][pAmmo1] = strval( value ); }
  2222.     if(!strcmp("Ammo2", name)) {  PlayerInfo[playerid][pAmmo2] = strval( value ); }
  2223.     if(!strcmp("Ammo3", name)) {  PlayerInfo[playerid][pAmmo3] = strval( value ); }
  2224.     if(!strcmp("RadioAlias", name)) {  strmid(PlayerInfo[playerid][pRadioAlias], value, 0, strlen(value), 255); }
  2225.     if(!strcmp("OfficialAlias", name)) {  strmid(PlayerInfo[playerid][pOfficialAlias], value, 0, strlen(value), 255); }
  2226.     if(!strcmp("VirWorld", name)) {  PlayerInfo[playerid][pVirWorld] = strval( value ); }
  2227.     if(!strcmp("Fuel", name)) {  PlayerInfo[playerid][pFuel] = strval( value ); }
  2228.     if(!strcmp("Sotaque", name)) {  strmid(PlayerInfo[playerid][pSotaque], value, 0, strlen(value), 255); }
  2229.     if(!strcmp("PistolSkill", name)) {  PlayerInfo[playerid][pPISTOL] = strval( value );  }
  2230.     if(!strcmp("SilencedSkill", name)) {  PlayerInfo[playerid][pPISTOL_SILENCED] = strval( value );   }
  2231.     if(!strcmp("DesertSkill", name)) {  PlayerInfo[playerid][pDESERT_EAGLE] = strval( value );   }
  2232.     if(!strcmp("ShotgunSkill", name)) {  PlayerInfo[playerid][pSHOTGUN] = strval( value );   }
  2233.     if(!strcmp("SawnoffSkill", name)) {  PlayerInfo[playerid][pSAWNOFF_SHOTGUN] = strval( value );   }
  2234.     if(!strcmp("SpasSkill", name)) {  PlayerInfo[playerid][pSPAS12_SHOTGUN] = strval( value );   }
  2235.     if(!strcmp("UziSkill", name)) {  PlayerInfo[playerid][pMICRO_UZI] = strval( value );  }
  2236.     if(!strcmp("MP5Skill", name)) {  PlayerInfo[playerid][pMP5] = strval( value );  }
  2237.     if(!strcmp("AK47Skill", name)) {  PlayerInfo[playerid][pAK47] = strval( value );   }
  2238.     if(!strcmp("M4Skill", name)) {  PlayerInfo[playerid][pM4] = strval( value );   }
  2239.     if(!strcmp("SniperSkill", name)) {  PlayerInfo[playerid][pSNIPERRIFLE] = strval( value );  }
  2240.     if(!GetPVarInt(playerid, "PlayerLogged"))
  2241.     {
  2242.         SendClientMessage(playerid, COLOR_SYSTEM, "[SYS]: Processando seu login, aguarde...");
  2243.         SetTimerEx("SetLogin", 800, 0, "i", playerid);
  2244.         SetPVarInt(playerid, "PlayerLogged", 1);
  2245.         return 1;
  2246.     }
  2247.     return 1;
  2248. }
  2249.  
  2250. forward SetLogin(playerid);
  2251. public SetLogin(playerid)
  2252. {
  2253.     if(PlayerInfo[playerid][pCK] > 0)
  2254.     {
  2255.         SendClientMessage(playerid, COLOR_SYSTEM, "[SYS]: Sua conta esta trancada. Caso queira, faça uma reclamação no fórum seu fórum.");
  2256.         format(_string, 128, "%s foi kickado ao logar por ter tomado CK.", ReturnPlayerNameEx(playerid));
  2257.         KickLog(_string);
  2258.         Kick(playerid);
  2259.     }
  2260.     SendClientMessage(playerid, COLOR_MAROON, "[===============================================================]");
  2261.     SendClientMessage(playerid, COLOR_CHARTREUSE,"Você acabou de logar no Seu servidor, bem vindo.");
  2262.     SendClientMessage(playerid, COLOR_MAROON, "Fórum: seu fórum");
  2263.     if (PlayerInfo[playerid][pAdmin] >= 1)
  2264.     {
  2265.         format(_string, sizeof(_string), "[SYS]: Você logou com o nível %d de administrador.",PlayerInfo[playerid][pAdmin]);
  2266.         SendClientMessage(playerid, COLOR_CHARTREUSE,_string);
  2267.     }
  2268.     SendClientMessage(playerid, COLOR_MAROON, "[===============================================================]");
  2269.     new playersip[16];
  2270.     new giveplayerid = playerid;
  2271.     new giveplayer[MAX_PLAYER_NAME];
  2272.     giveplayer = ReturnPlayerNameEx(giveplayerid);
  2273.     GetPlayerIp(giveplayerid ,playersip, sizeof(playersip));
  2274.     format(_string, sizeof(_string), "[SYS]: %s acaba de se logar. IP: %s",ReturnPlayerNameEx(playerid) ,playersip);
  2275.     LoginLog(_string);
  2276.     SystemWarning(COLOR_SYSTEM,_string);
  2277.     SetPlayerSpawn(playerid);
  2278.     SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2], 0, 0, 0, 0, 0, 0, 0);
  2279.     SpawnPlayer(playerid);
  2280.     SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
  2281.     SetTimerEx("UnsetCrash", 5000, false, "i", playerid);
  2282.     #if defined DEBUG
  2283.         format(_largestring, 1280, "[SetLogin] \"%s\"", ReturnPlayerNameEx(playerid));
  2284.         DebugLog(_largestring);
  2285.     #endif
  2286.     return 1;
  2287. }
  2288.  
  2289. forward Logar(playerid, name[],value[]);
  2290. public Logar(playerid, name[], value[])
  2291. {
  2292.     #if defined DEBUG
  2293.         format(_largestring, 1280, "[Logar] \"%s\", \"%s\", \"%s\"", ReturnPlayerNameEx(playerid), name, value);
  2294.         DebugLog(_largestring);
  2295.     #endif
  2296.     if(GetPVarInt(playerid, "PlayerLogged")) return 0;
  2297.     new file[36], lstr[24];
  2298.     format(file, 36, "Contas/%s.ini", ReturnFullName(playerid));
  2299.     new acstring[180];
  2300.     format(acstring, 180, "Bem Vindo, {FF0000}%s!\nATENÇÃO: Você registrou uma senha inválida!\nSe errar três vezes, você será banido!{A9C4E4}\nDigite a senha que você acabou de registrar:", ReturnPlayerNameEx(playerid));
  2301.     if (!strcmp(name, "Key"))
  2302.     {
  2303.         new cameo[24];
  2304.         strmid(cameo, value, 0, 255);
  2305.         PlayerInfo[playerid][pKey] = cameo;
  2306.     }
  2307.     GetPVarString(playerid, "PassW", lstr, 24);
  2308.     if(!strcmp(PlayerInfo[playerid][pKey],lstr)) return INI_ParseFile(file, "OnPlayerLoginEx", false, true, playerid);
  2309.     else return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Seu servidor Roleplay", acstring, "Logar", "Sair"), 0;
  2310. }
  2311.  
  2312. //================================[SAVING PUBLICS]==============================
  2313.  
  2314. stock SaveWeapons()
  2315. {
  2316.     new idx;
  2317.     new File: file2;
  2318.     idx = 0;
  2319.     while (idx < sizeof(ObjCoords))
  2320.     {
  2321.         new coordsstring[256];
  2322.         format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%f,%f,%f\n",
  2323.         ObjectID[idx][0],// 1
  2324.         ObjectID[idx][1],// 2
  2325.         ObjectID[idx][2],// 3
  2326.         ObjCoords[idx][0],// 4
  2327.         ObjCoords[idx][1],// 5
  2328.         ObjCoords[idx][2]);// 15
  2329.         if(idx == 1)
  2330.         {
  2331.             file2 = fopen("weapons.cfg", io_write);
  2332.         }
  2333.         else
  2334.         {
  2335.             file2 = fopen("weapons.cfg", io_append);
  2336.         }
  2337.         fwrite(file2, coordsstring);
  2338.         idx++;
  2339.         fclose(file2);
  2340.         //OnPropTextdrawUpdate();
  2341.     }
  2342.     return 1;
  2343. }
  2344.  
  2345.  
  2346. stock OnPropUpdate()
  2347. {
  2348.     new idx;
  2349.     while (idx < sizeof(BuildingInfo))
  2350.     {
  2351.         new userFile[32];
  2352.         format(userFile, sizeof (userFile), "Interiores/Interior %d.ini", idx);
  2353.         new INI:file = INI_Open(userFile);
  2354.         INI_WriteFloat(file, "Entrada_X", BuildingInfo[idx][bEntrancex]);
  2355.         INI_WriteFloat(file, "Entrada_Y", BuildingInfo[idx][bEntrancey]);
  2356.         INI_WriteFloat(file, "Entrada_Z", BuildingInfo[idx][bEntrancez]);
  2357.         INI_WriteFloat(file, "Saida_X", BuildingInfo[idx][bExitx]);
  2358.         INI_WriteFloat(file, "Saida_Y", BuildingInfo[idx][bExity]);
  2359.         INI_WriteFloat(file, "Saida_Z", BuildingInfo[idx][bExitz]);
  2360.         INI_WriteString(file, "Nome", BuildingInfo[idx][bName]);
  2361.         INI_WriteInt(file, "Lock", BuildingInfo[idx][bLock]);
  2362.         INI_WriteInt(file, "VW", BuildingInfo[idx][bVW]);
  2363.         INI_WriteInt(file, "Int", BuildingInfo[idx][bInterior]);
  2364.         INI_Close(file);
  2365.         idx++;
  2366.     }
  2367.     idx = 0;
  2368.     while (idx < sizeof(CarInfo))
  2369.     {
  2370.         if(CreatedCar[idx]) idx++;
  2371.         new userFile[32];
  2372.         format(userFile, sizeof (userFile), "Carros/Veiculo %d.ini", idx);
  2373.         new INI:file = INI_Open(userFile);
  2374.         INI_WriteInt(file, "Modelo", CarInfo[idx][cModel]);
  2375.         INI_WriteFloat(file, "Pos_X", CarInfo[idx][cLocationx]);
  2376.         INI_WriteFloat(file, "Pos_Y", CarInfo[idx][cLocationy]);
  2377.         INI_WriteFloat(file, "Pos_Z", CarInfo[idx][cLocationz]);
  2378.         INI_WriteFloat(file, "Angulo", CarInfo[idx][cAngle]);
  2379.         INI_WriteInt(file, "Cor_1", CarInfo[idx][cColorOne]);
  2380.         INI_WriteInt(file, "Cor_2", CarInfo[idx][cColorTwo]);
  2381.         INI_WriteInt(file, "Lock", CarInfo[idx][cLock]);
  2382.         INI_WriteInt(file, "Faction", CarInfo[idx][cFaction]);
  2383.         INI_WriteInt(file, "Int", CarInfo[idx][cInt]);
  2384.         INI_WriteInt(file, "VW", CarInfo[idx][cVW]);
  2385.         INI_Close(file);
  2386.         idx++;
  2387.     }
  2388.     return 1;
  2389. }
  2390.  
  2391. stock SaveBuildings()
  2392. {
  2393.     for(new i = 0; i < sizeof(BuildingInfo); i++)
  2394.     {
  2395.         SaveBuildingEx(i);
  2396.     }
  2397.     return 1;
  2398. }
  2399.  
  2400. forward SaveBuildingEx(idx);
  2401. public SaveBuildingEx(idx)
  2402. {
  2403.     new userFile[32];
  2404.     format(userFile, sizeof (userFile), "Interiores/Interior %d.ini", idx);
  2405.     new INI:file = INI_Open(userFile);
  2406.     INI_WriteFloat(file, "Entrada_X", BuildingInfo[idx][bEntrancex]);
  2407.     INI_WriteFloat(file, "Entrada_Y", BuildingInfo[idx][bEntrancey]);
  2408.     INI_WriteFloat(file, "Entrada_Z", BuildingInfo[idx][bEntrancez]);
  2409.     INI_WriteFloat(file, "Saida_X", BuildingInfo[idx][bExitx]);
  2410.     INI_WriteFloat(file, "Saida_Y", BuildingInfo[idx][bExity]);
  2411.     INI_WriteFloat(file, "Saida_Z", BuildingInfo[idx][bExitz]);
  2412.     INI_WriteString(file, "Nome", BuildingInfo[idx][bName]);
  2413.     INI_WriteInt(file, "Lock", BuildingInfo[idx][bLock]);
  2414.     INI_WriteInt(file, "VW", BuildingInfo[idx][bVW]);
  2415.     INI_WriteInt(file, "Int", BuildingInfo[idx][bInterior]);
  2416.     INI_Close(file);
  2417.     return 1;
  2418. }
  2419.  
  2420. stock SaveCars()
  2421. {
  2422.     for(new i = 0; i < sizeof(CarInfo); i++)
  2423.     {
  2424.         SaveCarEx(i);
  2425.     }
  2426.     return 1;
  2427. }
  2428.  
  2429. forward SaveCarEx(idx);
  2430. public SaveCarEx(idx)
  2431. {
  2432.     new userFile[32];
  2433.     format(userFile, sizeof (userFile), "Carros/Veiculo %d.ini", idx);
  2434.     new INI:file = INI_Open(userFile);
  2435.     INI_WriteInt(file, "Modelo", CarInfo[idx][cModel]);
  2436.     INI_WriteFloat(file, "Pos_X", CarInfo[idx][cLocationx]);
  2437.     INI_WriteFloat(file, "Pos_Y", CarInfo[idx][cLocationy]);
  2438.     INI_WriteFloat(file, "Pos_Z", CarInfo[idx][cLocationz]);
  2439.     INI_WriteFloat(file, "Angulo", CarInfo[idx][cAngle]);
  2440.     INI_WriteInt(file, "Cor_1", CarInfo[idx][cColorOne]);
  2441.     INI_WriteInt(file, "Cor_2", CarInfo[idx][cColorTwo]);
  2442.     INI_WriteInt(file, "Lock", CarInfo[idx][cLock]);
  2443.     INI_WriteInt(file, "Faction", CarInfo[idx][cFaction]);
  2444.     INI_Close(file);
  2445.     return 1;
  2446. }
  2447.  
  2448. stock SaveFactions()
  2449. {
  2450.     for(new i = 0; i < sizeof(FactionInfo); i++)
  2451.     {
  2452.         new b[32];
  2453.         format(b, sizeof (b), "Times/Time %d.ini", i);
  2454.         INI_ParseFile(b, "SaveFactionEx", false, true, i);
  2455.     }
  2456.     return 1;
  2457. }
  2458.  
  2459. forward SaveFactionEx(idx);
  2460. public SaveFactionEx(idx)
  2461. {
  2462.     new userFile[32];
  2463.     format(userFile, sizeof (userFile), "Times/Time %d.ini", idx);
  2464.     new INI:file = INI_Open(userFile);
  2465.     INI_WriteFloat(file, "HQEN_X", FactionInfo[idx][fHQEntrnance][0]);
  2466.     INI_WriteFloat(file, "HQEN_Y", FactionInfo[idx][fHQEntrnance][1]);
  2467.     INI_WriteFloat(file, "HQEN_Z", FactionInfo[idx][fHQEntrnance][2]);
  2468.     INI_WriteFloat(file, "HQEX_X", FactionInfo[idx][fHQExit][0]);
  2469.     INI_WriteFloat(file, "HQEX_Y", FactionInfo[idx][fHQExit][1]);
  2470.     INI_WriteFloat(file, "HQEX_Z", FactionInfo[idx][fHQExit][2]);
  2471.     INI_WriteString(file, "Name", FactionInfo[idx][fName]);
  2472.     INI_WriteString(file, "Leader", FactionInfo[idx][fLeader]);
  2473.     INI_WriteInt(file, "Members", FactionInfo[idx][fMembers]);
  2474.     INI_WriteInt(file, "Interior", FactionInfo[idx][fInterior]);
  2475.     INI_WriteInt(file, "Type", FactionInfo[idx][fType]);
  2476.     INI_WriteString(file, "Rank1", FactionInfo[idx][fRank1]);
  2477.     INI_WriteString(file, "Rank2", FactionInfo[idx][fRank2]);
  2478.     INI_WriteString(file, "Rank3", FactionInfo[idx][fRank3]);
  2479.     INI_WriteString(file, "Rank4", FactionInfo[idx][fRank4]);
  2480.     INI_WriteString(file, "Rank5", FactionInfo[idx][fRank5]);
  2481.     INI_WriteString(file, "Rank6", FactionInfo[idx][fRank6]);
  2482.     INI_WriteString(file, "Rank7", FactionInfo[idx][fRank7]);
  2483.     INI_WriteString(file, "Rank8", FactionInfo[idx][fRank8]);
  2484.     INI_WriteString(file, "Rank9", FactionInfo[idx][fRank9]);
  2485.     INI_WriteString(file, "Rank10", FactionInfo[idx][fRank10]);
  2486.     INI_WriteString(file, "Rank11", FactionInfo[idx][fRank11]);
  2487.     INI_WriteString(file, "Rank12", FactionInfo[idx][fRank12]);
  2488.     INI_WriteString(file, "Rank13", FactionInfo[idx][fRank13]);
  2489.     INI_WriteString(file, "Rank14", FactionInfo[idx][fRank14]);
  2490.     INI_WriteString(file, "Rank15", FactionInfo[idx][fRank15]);
  2491.     INI_Close(file);
  2492.     return 1;
  2493. }
  2494.  
  2495. //================================[CHAT STOCKS]=================================
  2496.  
  2497.  
  2498. stock SendFormattedMessage(playerid, color, fstring[], {Float, _}:...)
  2499. {
  2500.     // This is the number of parameters which are not variable that are passed
  2501.     // to this function (i.e. the number of named parameters).
  2502.     static const
  2503.         STATIC_ARGS = 3;
  2504.     static const
  2505.         BYTES_PER_CELL = 4;
  2506.     // Get the number of variable arguments.
  2507.     new
  2508.         n = (numargs() - STATIC_ARGS) * BYTES_PER_CELL;
  2509.     if (n)
  2510.     {
  2511.         new
  2512.             message[128],
  2513.             arg_start,
  2514.             arg_end;
  2515.  
  2516.         // Load the real address of the last static parameter. Do this by
  2517.         // loading the address of the last known static parameter and then
  2518.         // adding the value of [FRM].
  2519.         #emit CONST.alt        fstring
  2520.         #emit LCTRL          5
  2521.         #emit ADD
  2522.         #emit STOR.S.pri       arg_start
  2523.  
  2524.         // Load the address of the last variable parameter. Do this by adding
  2525.         // the number of variable parameters on the value just loaded.
  2526.         #emit LOAD.S.alt       n
  2527.         #emit ADD
  2528.         #emit STOR.S.pri       arg_end
  2529.  
  2530.         // Push the variable arguments. This is done by loading the value of
  2531.         // each one in reverse order and pushing them. I'd love to be able to
  2532.         // rewrite this to use the values of pri and alt for comparison,
  2533.         // instead of having to constantly load and reload two variables.
  2534.         do
  2535.         {
  2536.             #emit LOAD.I
  2537.             #emit PUSH.pri
  2538.             arg_end -= BYTES_PER_CELL;
  2539.             #emit LOAD.S.pri     arg_end
  2540.         }
  2541.         while (arg_end > arg_start);
  2542.  
  2543.         // Push the static format parameters.
  2544.         #emit PUSH.S         fstring
  2545.         #emit PUSH.C         128
  2546.         #emit PUSH.ADR        message
  2547.  
  2548.         // Now push the number of arguments passed to format, including both
  2549.         // static and variable ones and call the function.
  2550.         n += BYTES_PER_CELL * 3;
  2551.         #emit PUSH.S         n
  2552.         #emit SYSREQ.C        format
  2553.  
  2554.         // Remove all data, including the return value, from the stack.
  2555.         n += BYTES_PER_CELL;
  2556.         #emit LCTRL          4
  2557.         #emit LOAD.S.alt       n
  2558.         #emit ADD
  2559.         #emit SCTRL          4
  2560.  
  2561.         return SendClientMessage(playerid, color, message);
  2562.         //return print(message);
  2563.     }
  2564.     else
  2565.     {
  2566.         return SendClientMessage(playerid, color, fstring);
  2567.         //return print(fstring);
  2568.     }
  2569. }
  2570.  
  2571. stock AdminWarning(color, string[], level = 1)
  2572. {
  2573.     foreach(Player, i)
  2574.     {
  2575.         if(IsPlayerConnected(i))
  2576.         {
  2577.             if (PlayerInfo[i][pAdmin] >= level && GetPVarInt(i, "ReadAdminWarning"))
  2578.             {
  2579.                 new stringfull[192];
  2580.                 new lengths[96];
  2581.                 new length2[96];
  2582.                 strmid(stringfull, string, 0, 192);
  2583.                 strmid(lengths, stringfull, 0, 96);
  2584.                 strmid(length2, string, 95, 192);
  2585.                 if(strlen(string) > 96)
  2586.                 {
  2587.                     new message[102];
  2588.                     format(message, 102, "{AFAFAF}[{FF9900}A{AFAFAF}]: %s ...", lengths);
  2589.                     SendClientMessage(i, color, message);
  2590.                     AdminLog(message);
  2591.                     format(message, 102, "... %s", length2);
  2592.                     SendClientMessage(i, color, message);
  2593.                     AdminLog(message);
  2594.                     return 1;
  2595.                 }
  2596.                 else
  2597.                 {
  2598.                     new message[192];
  2599.                     format(message, 192, "{AFAFAF}[{FF9900}A{AFAFAF}]: %s", string);
  2600.                     SendClientMessage(i, color, message);
  2601.                     AdminLog(message);
  2602.                     return 1;
  2603.                 }
  2604.             }
  2605.         }
  2606.     }
  2607.     return 1;
  2608. }
  2609.  
  2610. stock AdminChat(color, string[], level = 1)
  2611. {
  2612.     foreach(Player, i)
  2613.     {
  2614.         if(IsPlayerConnected(i))
  2615.         {
  2616.             if (PlayerInfo[i][pAdmin] >= level && GetPVarInt(i, "ReadAdminChat"))
  2617.             {
  2618.                 new stringfull[192];
  2619.                 new lengths[96];
  2620.                 new length2[96];
  2621.                 strmid(stringfull, string, 0, 192);
  2622.                 strmid(lengths, stringfull, 0, 96);
  2623.                 strmid(length2, string, 95, 192);
  2624.                 if(strlen(string) > 96)
  2625.                 {
  2626.                     new message[102];
  2627.                     format(message, 102, "%s ...", lengths);
  2628.                     SendClientMessage(i, color, message);
  2629.                     AdminLog(message);
  2630.                     format(message, 102, "... %s", length2);
  2631.                     SendClientMessage(i, color, message);
  2632.                     AdminLog(message);
  2633.                     return 1;
  2634.                 }
  2635.                 else
  2636.                 {
  2637.                     new message[192];
  2638.                     format(message, 192, "%s", string);
  2639.                     SendClientMessage(i, color, message);
  2640.                     AdminLog(message);
  2641.                     return 1;
  2642.                 }
  2643.             }
  2644.         }
  2645.     }
  2646.     return 1;
  2647. }
  2648.  
  2649. stock OOCMessage(color,const string[])
  2650. {
  2651.     foreach(Player, i)
  2652.     {
  2653.         if(IsPlayerConnected(i))
  2654.         {
  2655.             if(GetPVarInt(i, "OOC"))
  2656.             {
  2657.                 new stringfull[192];
  2658.                 new lengths[96];
  2659.                 new length2[96];
  2660.                 strmid(stringfull, string, 0, 192);
  2661.                 strmid(lengths, stringfull, 0, 96);
  2662.                 strmid(length2, string, 95, 192);
  2663.                 if(strlen(string) > 96)
  2664.                 {
  2665.                     new message[102];
  2666.                     format(message, 102, "%s ...", lengths);
  2667.                     SendClientMessageToAll(color, message);
  2668.                     format(message, 102, "... %s", length2);
  2669.                     SendClientMessageToAll(color, message);
  2670.                 }
  2671.                 else
  2672.                 {
  2673.                     new message[192];
  2674.                     format(message, 192, "%s", string);
  2675.                     SendClientMessageToAll(color, message);
  2676.                 }
  2677.                 OOCLog(stringfull);
  2678.             }
  2679.         }
  2680.     }
  2681.     return 1;
  2682. }
  2683.  
  2684. stock SendWalkieMessage(member, color, string[])
  2685. {
  2686.     foreach(Player, i)
  2687.     {
  2688.         if(IsPlayerConnected(i))
  2689.         {
  2690.             if(PlayerInfo[i][pRadioFreq] == member)
  2691.             {
  2692.                 new stringfull[192];
  2693.                 new lengths[96];
  2694.                 new length2[96];
  2695.                 strmid(stringfull, string, 0, 192);
  2696.                 strmid(lengths, stringfull, 0, 96);
  2697.                 strmid(length2, string, 95, 192);
  2698.                 if(strlen(string) > 96)
  2699.                 {
  2700.                     new message[102];
  2701.                     format(message, 102, "%s ...", lengths);
  2702.                     SendClientMessage(i, color, message);
  2703.                     format(message, 102, "... %s", length2);
  2704.                     SendClientMessage(i, color, message);
  2705.                 }
  2706.                 else
  2707.                 {
  2708.                     new message[192];
  2709.                     format(message, 192, "%s", string);
  2710.                     SendClientMessage(i, color, message);
  2711.                 }
  2712.                 WalkieLog(string);
  2713.             }
  2714.         }
  2715.     }
  2716. }
  2717.  
  2718. stock SendRadioMessage(member, color, string[])
  2719. {
  2720.     foreach(Player, i)
  2721.     {
  2722.         if(IsPlayerConnected(i))
  2723.         {
  2724.             if(PlayerInfo[i][pFaction] == member)
  2725.             {
  2726.                 new stringfull[192];
  2727.                 new lengths[96];
  2728.                 new length2[96];
  2729.                 strmid(stringfull, string, 0, 192);
  2730.                 strmid(lengths, stringfull, 0, 96);
  2731.                 strmid(length2, string, 95, 192);
  2732.                 if(strlen(string) > 96)
  2733.                 {
  2734.                     new message[102];
  2735.                     format(message, 102, "%s ...", lengths);
  2736.                     SendClientMessage(i, color, message);
  2737.                     format(message, 102, "... %s", length2);
  2738.                     SendClientMessage(i, color, message);
  2739.                 }
  2740.                 else
  2741.                 {
  2742.                     new message[192];
  2743.                     format(message, 192, "%s", string);
  2744.                     SendClientMessage(i, color, message);
  2745.                 }
  2746.                 RadioLog(string);
  2747.             }
  2748.         }
  2749.     }
  2750. }
  2751.  
  2752. stock SendFactionMessage(family, color, string[])
  2753. {
  2754.     foreach(Player, i)
  2755.     {
  2756.         if(IsPlayerConnected(i))
  2757.         {
  2758.             if(PlayerInfo[i][pFaction] == family)
  2759.             {
  2760.                 if(GetPVarInt(i, "FAC"))
  2761.                 {
  2762.                     new stringfull[192];
  2763.                     new lengths[96];
  2764.                     new length2[96];
  2765.                     strmid(stringfull, string, 0, 192);
  2766.                     strmid(lengths, stringfull, 0, 96);
  2767.                     strmid(length2, string, 95, 192);
  2768.                     if(strlen(string) > 96)
  2769.                     {
  2770.                         new message[102];
  2771.                         format(message, 102, "%s ...", lengths);
  2772.                         SendClientMessage(i, color, message);
  2773.                         format(message, 102, "... %s", length2);
  2774.                         SendClientMessage(i, color, message);
  2775.                     }
  2776.                     else
  2777.                     {
  2778.                         new message[192];
  2779.                         format(message, 192, "%s", string);
  2780.                         SendClientMessage(i, color, message);
  2781.                     }
  2782.                     FactionLog(string);
  2783.                 }
  2784.             }
  2785.         }
  2786.     }
  2787. }
  2788.  
  2789. stock SystemWarning(color, string[])
  2790. {
  2791.     foreach(Player, i)
  2792.     {
  2793.         if(IsPlayerConnected(i))
  2794.         {
  2795.             if (PlayerInfo[i][pAdmin] >= 1 && GetPVarInt(i, "ReadSystemWarning"))
  2796.             {
  2797.                 new stringfull[192];
  2798.                 new lengths[96];
  2799.                 new length2[96];
  2800.                 strmid(stringfull, string, 0, 192);
  2801.                 strmid(lengths, stringfull, 0, 96);
  2802.                 strmid(length2, string, 95, 192);
  2803.                 if(strlen(string) > 96)
  2804.                 {
  2805.                     new message[102];
  2806.                     format(message, 102, "{AFAFAF}[{A9C4E4}SYS{AFAFAF}]: %s ...", lengths);
  2807.                     SendClientMessage(i, color, message);
  2808.                     format(message, 102, "{AFAFAF}... %s", length2);
  2809.                     SendClientMessage(i, color, message);
  2810.                 }
  2811.                 else
  2812.                 {
  2813.                     new message[192];
  2814.                     format(message, 192, "{AFAFAF}[{A9C4E4}SYS{AFAFAF}]: %s", string);
  2815.                     SendClientMessage(i, color, message);
  2816.                 }
  2817.                 SystemLog(string);
  2818.             }
  2819.         }
  2820.     }
  2821. }
  2822.  
  2823. stock SystemBroadcast(color, string[])
  2824. {
  2825.     new stringfull[192];
  2826.     new lengths[96];
  2827.     new length2[96];
  2828.     strmid(stringfull, string, 0, 192);
  2829.     strmid(lengths, stringfull, 0, 96);
  2830.     strmid(length2, string, 95, 192);
  2831.     if(strlen(string) > 96)
  2832.     {
  2833.         new message[102];
  2834.         format(message, 102, "{AFAFAF}[{A9C4E4}SYS{AFAFAF}]%s ...", lengths);
  2835.         SendClientMessageToAll(color, message);
  2836.         format(message, 102, "{AFAFAF}... %s", length2);
  2837.         SendClientMessageToAll(color, message);
  2838.     }
  2839.     else
  2840.     {
  2841.         new message[192];
  2842.         format(message, 192, "{AFAFAF}[{A9C4E4}SYS{AFAFAF}]%s", string);
  2843.         SendClientMessageToAll(color, message);
  2844.     }
  2845.     SystemLog(string);
  2846. }
  2847.  
  2848. stock Broadcast(color, string[])
  2849. {
  2850.     new stringfull[192];
  2851.     new lengths[96];
  2852.     new length2[96];
  2853.     strmid(stringfull, string, 0, 192);
  2854.     strmid(lengths, stringfull, 0, 96);
  2855.     strmid(length2, string, 95, 192);
  2856.     if(strlen(string) > 96)
  2857.     {
  2858.         new message[102];
  2859.         format(message, 102, "%s ...", lengths);
  2860.         SendClientMessageToAll(color, message);
  2861.         format(message, 102, "... %s", length2);
  2862.         SendClientMessageToAll(color, message);
  2863.     }
  2864.     else
  2865.     {
  2866.         new message[192];
  2867.         format(message, 192, "%s", string);
  2868.         SendClientMessageToAll(color, message);
  2869.     }
  2870.     SystemLog(string);
  2871. }
  2872.  
  2873. stock SendErrorMessage(playerid, color, string[])
  2874. {
  2875.     new stringfull[192];
  2876.     new lengths[96];
  2877.     new length2[96];
  2878.     strmid(stringfull, string, 0, 192);
  2879.     strmid(lengths, stringfull, 0, 96);
  2880.     strmid(length2, string, 95, 192);
  2881.     if(strlen(string) > 96)
  2882.     {
  2883.         new message[192];
  2884.         format(message, 192, "{AFAFAF}[{FF0000}!{AFAFAF}]%s ...", lengths);
  2885.         SendClientMessage(playerid, color, message);
  2886.         format(message, 192, "{AFAFAF}... %s", length2);
  2887.         SendClientMessage(playerid, color, message);
  2888.     }
  2889.     else
  2890.     {
  2891.         new message[192];
  2892.         format(message, 192, "{AFAFAF}[{FF0000}!{AFAFAF}] %s", string);
  2893.         SendClientMessage(playerid, color, message);
  2894.     }
  2895.     return 1;
  2896. }
  2897.  
  2898. stock SendWarningMessage(playerid, color, string[])
  2899. {
  2900.     new stringfull[192];
  2901.     new lengths[96];
  2902.     new length2[96];
  2903.     strmid(stringfull, string, 0, 192);
  2904.     strmid(lengths, stringfull, 0, 96);
  2905.     strmid(length2, string, 95, 192);
  2906.     if(strlen(string) > 96)
  2907.     {
  2908.         new message[192];
  2909.         format(message, 192, "{AFAFAF}[{FF9900}!{AFAFAF}] %s ...",lengths);
  2910.         SendClientMessage(playerid, color, message);
  2911.         format(message, 192, "{AFAFAF}... %s", length2);
  2912.         SendClientMessage(playerid, color, message);
  2913.     }
  2914.     else
  2915.     {
  2916.         new message[192];
  2917.         format(message, 192, "{AFAFAF}[{FF9900}!{AFAFAF}] %s", string);
  2918.         SendClientMessage(playerid, color, message);
  2919.     }
  2920.     return 1;
  2921. }
  2922.  
  2923. stock SendSystemMessage(playerid, color, string[])
  2924. {
  2925.     new stringfull[192];
  2926.     new lengths[96];
  2927.     new length2[96];
  2928.     strmid(stringfull, string, 0, 192);
  2929.     strmid(lengths, stringfull, 0, 96);
  2930.     strmid(length2, string, 95, 192);
  2931.     if(strlen(string) > 96)
  2932.     {
  2933.         new message[192];
  2934.         format(message, 192, "{AFAFAF}[{A9C4E4}!{AFAFAF}] * %s ...",lengths);
  2935.         SendClientMessage(playerid, color, message);
  2936.         format(message, 192, "{AFAFAF}... %s", length2);
  2937.         SendClientMessage(playerid, color, message);
  2938.     }
  2939.     else
  2940.     {
  2941.         new message[192];
  2942.         format(message, 192, "{AFAFAF}[{A9C4E4}!{AFAFAF}] * %s", string);
  2943.         SendClientMessage(playerid, color, message);
  2944.     }
  2945.     return 1;
  2946. }
  2947.  
  2948. stock SendActionMessage(playerid, color, string[])
  2949. {
  2950.     new stringfull[192];
  2951.     new lengths[96];
  2952.     new length2[96];
  2953.     strmid(stringfull, string, 0, 192);
  2954.     strmid(lengths, stringfull, 0, 96);
  2955.     strmid(length2, string, 95, 192);
  2956.     if(strlen(string) > 96)
  2957.     {
  2958.         new message[192];
  2959.         format(message, 192, "{AFAFAF}[{C2A2DA}!{AFAFAF}] * %s ...",lengths);
  2960.         SendClientMessage(playerid, color, message);
  2961.         format(message, 192, "{AFAFAF}... %s", length2);
  2962.         SendClientMessage(playerid, color, message);
  2963.     }
  2964.     else
  2965.     {
  2966.         new message[192];
  2967.         format(message, 192, "{AFAFAF}[{C2A2DA}!{AFAFAF}] * %s", string);
  2968.         SendClientMessage(playerid, color, message);
  2969.     }
  2970.     return 1;
  2971. }
  2972.  
  2973. stock SendCommandMessage(playerid, color, string[])
  2974. {
  2975.     new stringfull[192];
  2976.     new lengths[96];
  2977.     new length2[96];
  2978.     strmid(stringfull, string, 0, 192);
  2979.     strmid(lengths, stringfull, 0, 96);
  2980.     strmid(length2, string, 95, 192);
  2981.     if(strlen(string) > 96)
  2982.     {
  2983.         new message[192];
  2984.         format(message, 192, "{AFAFAF}Uso: %s", lengths);
  2985.         SendClientMessage(playerid, color, message);
  2986.         format(message, 192, "{AFAFAF}... %s", length2);
  2987.         SendClientMessage(playerid, color, message);
  2988.     }
  2989.     else
  2990.     {
  2991.         new message[192];
  2992.         format(message, 192, "{AFAFAF}Uso: %s", string);
  2993.         SendClientMessage(playerid, color, message);
  2994.     }
  2995.     return 1;
  2996. }
  2997.  
  2998. stock Command_GetDisplayNamed(vixp[], playerid)
  2999. {
  3000.     #pragma unused playerid
  3001.     return vixp;
  3002. }
  3003.  
  3004. //==================================[COMMANDS]==================================
  3005. CMD:re(playerid, params[])
  3006.     return cmd_relatorio(playerid, params);
  3007.  
  3008. CMD:relatar(playerid, params[])
  3009.     return cmd_relatorio(playerid, params);
  3010.  
  3011. CMD:reportar(playerid, params[])
  3012.     return cmd_relatorio(playerid, params);
  3013.  
  3014. CMD:denunciar(playerid, params[])
  3015.     return cmd_relatorio(playerid, params);
  3016.  
  3017. CMD:relatorio(playerid, params[])
  3018. {
  3019.     format(_largestring, 1280, "%s - /relatorio %s", ReturnFullName(playerid), params);
  3020.     CommandLog(_largestring);
  3021.     if(GetPVarInt(playerid, "ReportTime") != 0)
  3022.     {
  3023.         format(_string, 128, "Você não pode usar isso! Espere %d segundos para usar novamente.", GetPVarInt(playerid, "ReportTime"));
  3024.         SendErrorMessage(playerid, -1, _string);
  3025.         return 1;
  3026.     }
  3027.     new otherplayerid, message[128];
  3028.     if (sscanf(params, "us[128]", otherplayerid, message))
  3029.     {
  3030.         format(_string, sizeof (_string), "\"/%s [id/nome] [texto]\"", Command_GetDisplayNamed("relatorio", playerid));
  3031.         return SendCommandMessage(playerid, -1, _string);
  3032.     }
  3033.     _playername = ReturnPlayerNameEx(playerid);
  3034.     _otherplayername = ReturnPlayerNameEx(otherplayerid);
  3035.     format(_string, sizeof(_string), "%s (%d) reportou o jogador %s (%d)", _playername, playerid, _otherplayername, otherplayerid);
  3036.     AdminWarning(COLOR_WARNING,_string,1);
  3037.     format(_string, sizeof(_string), "\"%s\"", (message));
  3038.     AdminWarning(COLOR_WARNING,_string,1);
  3039.     AdminWarning(COLOR_WARNING,"Digite \"/aceitarrelatorio (/ar) [id/nome]\" ou \"/rejeitarrelatorio (/rr) [id/nome]\"",1);
  3040.     SendWarningMessage(playerid, COLOR_SYSTEM, "Seu relatório foi enviado. Aguarde até que ele seja respondido.");
  3041.     SetPVarInt(playerid, "PlayerReported", 1);
  3042.     SetPVarInt(playerid, "ReportTime", 30);
  3043.     return 1;
  3044. }
  3045.  
  3046. CMD:jarma(playerid, params[])
  3047.     return cmd_jogararma(playerid, params);
  3048.  
  3049. CMD:jogararma(playerid, params[])
  3050. {
  3051.     format(_largestring, 1280, "%s - /jogararma %s", ReturnFullName(playerid), params);
  3052.     CommandLog(_largestring);
  3053.     new gunID = GetPlayerWeapon(playerid);
  3054.     new gunAmmo = GetPlayerAmmo(playerid);
  3055.     if(gunID != 0 && gunAmmo != 0)
  3056.     {
  3057.         new f = maxobj+1;
  3058.         for(new a = 0; a < sizeof(ObjCoords); a++)
  3059.         {
  3060.             if(ObjCoords[a][0] == 0.0) f = a;
  3061.         }
  3062.  
  3063.         if(f == maxobj+1) return SendErrorMessage(playerid, 0x33AA3300, "Você não pode jogar armas no chão agora, tente novamente mais tarde!");
  3064.         else
  3065.         {
  3066.             format(_string, sizeof(_string), "Você deixou uma/um %s", ReturnWeaponName(gunID));
  3067.             SendActionMessage(playerid, COLOR_YELLOW, _string);
  3068.             format(_string, 128, "* %s coloca uma/um %s no chão.", ReturnPlayerNameEx(playerid), ReturnWeaponName(gunID));
  3069.             nearByMessage(playerid, COLOR_PURPLE, _string);
  3070.             RemovePlayerWeapon(playerid, gunID);
  3071.             ObjectID[f][0] = gunID;
  3072.             ObjectID[f][1] = gunAmmo;
  3073.             ObjectID[f][2] = GetPlayerVirtualWorld(playerid);
  3074.             GetPlayerPos(playerid, ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]);
  3075.             object[f] = CreateDynamicObject(GunObjects[gunID][0], ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]-1, 93.7, 120.0, 120.0, ObjectID[f][2], -1, -1, 200.0);
  3076.             SaveWeapons();
  3077.         }
  3078.     }
  3079.     return 1;
  3080. }
  3081.  
  3082. CMD:parma(playerid, params[])
  3083.     return cmd_pegararma(playerid, params);
  3084.  
  3085. CMD:pegararma(playerid, params[])
  3086. {
  3087.     format(_largestring, 1280, "%s - /pegararma %s", ReturnFullName(playerid), params);
  3088.     CommandLog(_largestring);
  3089.     new f = maxobj+1;
  3090.     for(new a=0;a<sizeof(ObjCoords);a++)
  3091.     {
  3092.         if(ObjectID[a][0] != 0)
  3093.         {
  3094.             if(IsPlayerInRangeOfPoint(playerid, 5.0, ObjCoords[a][0], ObjCoords[a][1], ObjCoords[a][2]))
  3095.             f = a;
  3096.         }
  3097.     }
  3098.     if(f == maxobj+1 || Dropped[f] == 1) return SendErrorMessage(playerid, 0x33AA3300, "Você não esta perto de uma arma!");
  3099.     else
  3100.     {
  3101.         DestroyDynamicObject(object[f]);
  3102.         GivePlayerWeaponEx(playerid, ObjectID[f][0], ObjectID[f][1]);
  3103.         format(_string, sizeof(_string), "Você deixou uma/um %s", ReturnWeaponName(ObjectID[f][0]));
  3104.         SendActionMessage(playerid, COLOR_YELLOW, _string);
  3105.         format(_string, 128, "* %s coloca uma/um %s no chão.", ReturnPlayerNameEx(playerid), ReturnWeaponName(ObjectID[f][0]));
  3106.         nearByMessage(playerid, COLOR_PURPLE, _string);
  3107.         ObjectID[f][0] = 0;
  3108.         ObjectID[f][1] = 0;
  3109.         ObjectID[f][2] = 0;
  3110.         ObjCoords[f][0] = 0.0;
  3111.         ObjCoords[f][1] = 0.0;
  3112.         ObjCoords[f][2] = 0.0;
  3113.         SaveWeapons();
  3114.     }
  3115.     return 1;
  3116. }
  3117.  
  3118. CMD:codenome(playerid, params[])
  3119. {
  3120.     format(_largestring, 1280, "%s - /codenome %s", ReturnFullName(playerid), params);
  3121.     CommandLog(_largestring);
  3122.     new result[24];
  3123.     if (sscanf(params, "s[24]", result))
  3124.     {
  3125.         format(_string, sizeof (_string), "\"/%s [codenome]\" - Máximo de 24 caracteres.", Command_GetDisplayNamed("codenome", playerid));
  3126.         return SendCommandMessage(playerid, -1, _string);
  3127.     }
  3128.     if(!GetPVarInt(playerid, "CodenomeOn"))
  3129.     {
  3130.         PlayerInfo[playerid][pOfficialAlias] = result;
  3131.         format(_string, sizeof(_string), "Seu codenome nos rádios principais agora é: \"%s\"", PlayerInfo[playerid][pOfficialAlias]);
  3132.         SendWarningMessage(playerid, COLOR_WHITE, _string);
  3133.         SetPVarInt(playerid, "CodenomeOn", 1);
  3134.         return 1;
  3135.     }
  3136.     else
  3137.     {
  3138.         DeletePVar(playerid, "CodenomeOn");
  3139.         return SendWarningMessage(playerid, COLOR_GRAD2, " Você desligou seu codenome.");
  3140.     }
  3141. }
  3142.  
  3143. CMD:codenomewt(playerid, params[])
  3144. {
  3145.     format(_largestring, 1280, "%s - /codenomewt %s", ReturnFullName(playerid), params);
  3146.     CommandLog(_largestring);
  3147.     new result[24];
  3148.     if (sscanf(params, "s[24]", result))
  3149.     {
  3150.         format(_string, sizeof (_string), "\"/%s [codenome]\" - Máximo de 24 caracteres.", Command_GetDisplayNamed("codenomewt", playerid));
  3151.         return SendCommandMessage(playerid, -1, _string);
  3152.     }
  3153.     if(!GetPVarInt(playerid, "CodenomeWTOn"))
  3154.     {
  3155.         PlayerInfo[playerid][pRadioAlias] = result;
  3156.         format(_string, sizeof(_string), "Seu codenome nos rádios de walkie talkie agora é: \"%s\"", PlayerInfo[playerid][pRadioAlias]);
  3157.         SendWarningMessage(playerid, COLOR_WHITE, _string);
  3158.         SetPVarInt(playerid, "CodenomeWTOn", 1);
  3159.         return 1;
  3160.     }
  3161.     else
  3162.     {
  3163.         DeletePVar(playerid, "CodenomeOn");
  3164.         return SendWarningMessage(playerid, COLOR_GRAD2, " Você desligou seu codenome.");
  3165.     }
  3166. }
  3167.  
  3168. CMD:descricao(playerid, params[])
  3169. {
  3170.     format(_largestring, 1280, "%s - /descricao %s", ReturnFullName(playerid), params);
  3171.     CommandLog(_largestring);
  3172.     new result[128];
  3173.     if (sscanf(params, "s[128]", result))
  3174.     {
  3175.         format(_string, sizeof (_string), "\"/%s [descrição]\" - Máximo de 128 caracteres.", Command_GetDisplayNamed("descricao", playerid));
  3176.         return SendCommandMessage(playerid, -1, _string);
  3177.     }
  3178.     if(GetPVarInt(playerid, "PlayerDescriptionOn"))
  3179.     {
  3180.         DeletePVar(playerid, "PlayerDescriptionOn");
  3181.         DestroyDynamic3DTextLabel(PlayerDescription[playerid]);
  3182.         return SendWarningMessage(playerid, 0xFFFFFFFF, "Você desligou sua descrição.");
  3183.     }
  3184.     SetPVarInt(playerid, "PlayerDescriptionOn", 1);
  3185.     format(_string,sizeof(_string),"[DESCRIÇÃO]\n\"%s\"",(result));
  3186.     PlayerDescription[playerid] = CreateDynamic3DTextLabel(_string, 0xC2A2DAFF, 0.0, 0.0, 0.3, 35, playerid);
  3187.     format(_string, sizeof(_string), "Sua descrição agora é \"%s\", digite \"/descricao\" novamente para retirá-la.", result);
  3188.     SendWarningMessage(playerid, COLOR_WHITE, _string);
  3189.     return 1;
  3190. }
  3191.  
  3192. CMD:sotaque(playerid, params[])
  3193. {
  3194.     format(_largestring, 1280, "%s - /sotaque %s", ReturnFullName(playerid), params);
  3195.     CommandLog(_largestring);
  3196.     new result[24];
  3197.     if (sscanf(params, "s[24]", result))
  3198.     {
  3199.         format(_string, sizeof (_string), "\"/%s [sotaque]\" - Máximo de 24 caracteres.", Command_GetDisplayNamed("sotaque", playerid));
  3200.         return SendCommandMessage(playerid, -1, _string);
  3201.     }
  3202.     if(GetPVarInt(playerid, "SotaqueOn"))
  3203.     {
  3204.         DeletePVar(playerid, "SotaqueOn");
  3205.         return SendWarningMessage(playerid, 0xFFFFFFFF, "Você retirou seu sotaque.");
  3206.     }
  3207.     SetPVarInt(playerid, "SotaqueOn", 1);
  3208.     strins(PlayerInfo[playerid][pSotaque],result, 0);
  3209.     format(_string, sizeof(_string), "Seu sotaque agora é \"%s\", digite \"/sotaque\" novamente para retirá-lo.", result);
  3210.     SendWarningMessage(playerid, COLOR_WHITE, _string);
  3211.     return 1;
  3212. }
  3213.  
  3214. CMD:sos(playerid, params[])
  3215.     return cmd_duvida(playerid, params);
  3216.  
  3217. CMD:duvida(playerid, params[])
  3218. {
  3219.     format(_largestring, 1280, "%s - /duvida %s", ReturnFullName(playerid), params);
  3220.     CommandLog(_largestring);
  3221.     if(GetPVarInt(playerid, "ReportTime") != 0)
  3222.     {
  3223.         format(_string, 128, "Você não pode usar isso! Espere %d segundos para usar novamente.", GetPVarInt(playerid, "ReportTime"));
  3224.         SendErrorMessage(playerid, -1, _string);
  3225.         return 1;
  3226.     }
  3227.     new message[128];
  3228.     if (sscanf(params, "s[128]", message))
  3229.     {
  3230.         format(_string, sizeof (_string), "\"/%s [dúvida]\"", Command_GetDisplayNamed("duvida", playerid));
  3231.         return SendCommandMessage(playerid, -1, _string);
  3232.     }
  3233.     _playername = ReturnPlayerNameEx(playerid);
  3234.     format(_string, sizeof(_string), "%s (%d) enviou um pedido de ajuda", _playername, playerid);
  3235.     AdminWarning(COLOR_WARNING,_string,1);
  3236.     format(_string, sizeof(_string), "\"%s\"", (message));
  3237.     AdminWarning(COLOR_WARNING,_string,1);
  3238.     SendWarningMessage(playerid, COLOR_SYSTEM, "Seu pedido de ajuda foi enviado. Aguarde até que ele seja respondido.");
  3239.     SetPVarInt(playerid, "ReportTime", 30);
  3240.     return 1;
  3241. }
  3242.  
  3243. CMD:anims(playerid, params[])
  3244.     return cmd_animacoes(playerid, params);
  3245.  
  3246. CMD:animlist(playerid, params[])
  3247.     return cmd_animacoes(playerid, params);
  3248.  
  3249. CMD:animhelp(playerid, params[])
  3250.     return cmd_animacoes(playerid, params);
  3251.  
  3252. CMD:animacoes(playerid, params[]) {
  3253.     format(_largestring, 1280, "%s - /animacoes %s", ReturnFullName(playerid), params);
  3254.     CommandLog(_largestring);
  3255.     SendClientMessage(playerid, COLOR_SYSTEM, "[===================[ANIMAÇÕES]===================]");
  3256.     SendClientMessage(playerid, COLOR_SYSTEM, "- Algumas animações tem mais de 1 comando para a mesma, exemplo: /maosalto é a mesma de /handsup.");
  3257.     SendClientMessage(playerid, COLOR_SYSTEM, "/maosalto - /maosatraz - /bebado - /bomba - /roubar - /rir - /olhar - /roubarhomem - /esconder - /vomitar");
  3258.     SendClientMessage(playerid, COLOR_SYSTEM, "/comer - /baternabunda - /dedodomeio - /crack - /taichi - /olharhoras - /dormir - /ferido - /abrirporta");
  3259.     SendClientMessage(playerid, COLOR_SYSTEM, "/acenarbaixo - /maosatraz - /ps - /mergulhar - /semostrar - /oculos - /chorar - /jogar - /roubado - /ferido");
  3260.     SendClientMessage(playerid, COLOR_SYSTEM, "/caixa - /lavarmaos - /cocarsaco - /saudar - /masturbar - /parar - /rap - /conversar - /gestos - /deitar");
  3261.     SendClientMessage(playerid, COLOR_SYSTEM, "/acenar - /sinal - /cansado - /cair - /andar - /loco - /olhar - /strip - /fumar - /dj - /recarregar");
  3262.     SendClientMessage(playerid, COLOR_SYSTEM, "/pixar - /negociar - /cruzarbracos - /taco - /comemorar - /sentar - /comersentado - /bar - /dancar");
  3263.     SendClientMessage(playerid, COLOR_SYSTEM, "- Para parar as animações, digite /stopanim ou /pararanimacoes.");
  3264.     return 1;
  3265. }
  3266.  
  3267. CMD:mijar(playerid, params[]) {
  3268.     SetPlayerSpecialAction(playerid, 68);
  3269.     return 1;
  3270. }
  3271.  
  3272. CMD:handsup(playerid, params[])
  3273.     return cmd_maosalto(playerid, params);
  3274.  
  3275. CMD:maosalto(playerid, params[]) {
  3276.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
  3277.     return 1;
  3278. }
  3279.  
  3280. CMD:maostraz(playerid, params[])
  3281.     return cmd_maostraz(playerid, params);
  3282.  
  3283. CMD:algemado(playerid, params[])
  3284.     return cmd_maosatraz(playerid, params);
  3285.  
  3286. CMD:maosatraz(playerid, params[]) {
  3287.     SetPlayerSpecialAction(playerid,SPECIAL_ACTION_CUFFED);
  3288.     return 1;
  3289. }
  3290.  
  3291. CMD:bebado(playerid, params[]) {
  3292.     ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0);
  3293.     return 1;
  3294. }
  3295.  
  3296. CMD:bomba(playerid, params[]) {
  3297.     ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  3298.     return 1;
  3299. }
  3300.  
  3301. CMD:roubar(playerid, params[]) {
  3302.     ApplyAnimation(playerid, "ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
  3303.     return 1;
  3304. }
  3305.  
  3306. CMD:rir(playerid, params[]) {
  3307.     ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
  3308.     return 1;
  3309. }
  3310.  
  3311. CMD:olhar(playerid, params[]) {
  3312.     ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
  3313.     return 1;
  3314. }
  3315.  
  3316. CMD:roubarhomem(playerid, params[]) {
  3317.     ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
  3318.     return 1;
  3319. }
  3320.  
  3321. CMD:esconder(playerid, params[]) {
  3322.     ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
  3323.     return 1;
  3324. }
  3325.  
  3326. CMD:vomitar(playerid, params[]) {
  3327.     ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
  3328.     return 1;
  3329. }
  3330.  
  3331. CMD:comer(playerid, params[]) {
  3332.     ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3333.     return 1;
  3334. }
  3335.  
  3336. CMD:baternabunda(playerid, params[]) {
  3337.     ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0);
  3338.     return 1;
  3339. }
  3340.  
  3341. CMD:crack(playerid, params[]) {
  3342.     ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  3343.     return 1;
  3344. }
  3345.  
  3346.  
  3347. CMD:fodase(playerid, params[])
  3348.     return cmd_dedomeio(playerid, params);
  3349.  
  3350. CMD:dedodomeio(playerid, params[])
  3351.     return cmd_dedomeio(playerid, params);
  3352.  
  3353. CMD:dedomeio(playerid, params[]) {
  3354.     ApplyAnimation(playerid, "PED", "fucku", 4.0, 0, 0, 0, 0, 0);
  3355.     return 1;
  3356. }
  3357.  
  3358. CMD:taichi(playerid, params[]) {
  3359.     ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
  3360.     return 1;
  3361. }
  3362.  
  3363. CMD:beber(playerid, params[]) {
  3364.     ApplyAnimation(playerid, "BAR", "dnk_stndF_loop", 4.0, 1, 0, 0, 0, 0);
  3365.     return 1;
  3366. }
  3367.  
  3368. CMD:olharhoras(playerid, params[]) {
  3369.     ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch", 4.0, 0, 0, 0, 0, 0);
  3370.     return 1;
  3371. }
  3372.  
  3373. CMD:dormir(playerid, params[]) {
  3374.     ApplyAnimation(playerid, "CRACK", "crckdeth4", 4.0, 0, 1, 1, 1, -1);
  3375.     return 1;
  3376. }
  3377.  
  3378. CMD:morrendo(playerid, params[]) {
  3379.     ApplyAnimation(playerid, "CRACK", "crckidle1", 4.0, 0, 1, 1, 1, -1);
  3380.     return 1;
  3381. }
  3382.  
  3383. CMD:abrirporta(playerid, params[]) {
  3384.     ApplyAnimation(playerid, "AIRPORT", "thrw_barl_thrw", 4.0, 0, 0, 0, 0, 0);
  3385.     return 1;
  3386. }
  3387.  
  3388. CMD:acenarbaixo(playerid, params[]) {
  3389.     ApplyAnimation(playerid, "BD_FIRE", "BD_Panic_01", 4.0, 0, 0, 0, 0, 0);
  3390.     return 1;
  3391. }
  3392.  
  3393. CMD:primeirossocorros(playerid, params[])
  3394.     return cmd_ps(playerid, params);
  3395.  
  3396. CMD:massagemcardiaca(playerid, params[])
  3397.     return cmd_ps(playerid, params);
  3398.  
  3399. CMD:ps(playerid, params[]) {
  3400.     ApplyAnimation(playerid, "MEDIC", "CPR", 4.0, 0, 0, 0, 0, 0);
  3401.     return 1;
  3402. }
  3403.  
  3404. CMD:mergulhar(playerid, params[]) {
  3405.     ApplyAnimation(playerid, "DODGE", "Crush_Jump", 4.0, 0, 1, 1, 1, 0);
  3406.     return 1;
  3407. }
  3408.  
  3409. CMD:semostrar(playerid, params[]) {
  3410.     ApplyAnimation(playerid, "Freeweights", "gym_free_celebrate", 4.0, 0, 0, 0, 0, 0);
  3411.     return 1;
  3412. }
  3413.  
  3414. CMD:oculos(playerid, params[]) {
  3415.     ApplyAnimation(playerid, "goggles", "goggles_put_on", 4.0, 0, 0, 0, 0, 0);
  3416.     return 1;
  3417. }
  3418.  
  3419. CMD:chorar(playerid, params[]) {
  3420.     ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.0, 1, 0, 0, 0, 0);
  3421.     return 1;
  3422. }
  3423.  
  3424. CMD:jogar(playerid, params[]) {
  3425.     ApplyAnimation(playerid, "GRENADE", "WEAPON_throw", 4.0, 0, 0, 0, 0, 0);
  3426.     return 1;
  3427. }
  3428.  
  3429. CMD:roubado(playerid, params[]) {
  3430.     ApplyAnimation(playerid, "SHOP", "SHP_Rob_GiveCash", 4.0, 0, 0, 0, 0, 0);
  3431.     return 1;
  3432. }
  3433.  
  3434. CMD:ferido(playerid, params[]) {
  3435.     ApplyAnimation(playerid, "SWAT", "gnstwall_injurd", 4.0, 1, 0, 0, 0, 0);
  3436.     return 1;
  3437. }
  3438.  
  3439. CMD:caixa(playerid, params[]) {
  3440.     ApplyAnimation(playerid, "GYMNASIUM", "GYMshadowbox", 4.0, 1, 0, 0, 0, 0);
  3441.     return 1;
  3442. }
  3443.  
  3444. CMD:lavarmaos(playerid, params[]) {
  3445.     ApplyAnimation(playerid, "BD_FIRE", "wash_up", 4.0, 0, 0, 0, 0, 0);
  3446.     return 1;
  3447. }
  3448.  
  3449. CMD:cocar(playerid, params[])
  3450.     return cmd_coceira(playerid, params);
  3451.  
  3452. CMD:cocarsaco(playerid, params[])
  3453.     return cmd_coceira(playerid, params);
  3454.  
  3455. CMD:coceira(playerid, params[]) {
  3456.     ApplyAnimation(playerid, "MISC", "Scratchballs_01", 4.0, 0, 0, 0, 0, 0);
  3457.     return 1;
  3458. }
  3459.  
  3460. CMD:saudar(playerid, params[]) {
  3461.     ApplyAnimation(playerid, "ON_LOOKERS", "Pointup_loop", 4.0, 1, 0, 0, 0, 0);
  3462.     return 1;
  3463. }
  3464.  
  3465. CMD:masturbar(playerid, params[]) {
  3466.     ApplyAnimation(playerid, "PAULNMAC", "wank_out", 4.0, 0, 0, 0, 0, 0);
  3467.     return 1;
  3468. }
  3469.  
  3470. CMD:parar(playerid, params[]) {
  3471.     ApplyAnimation(playerid, "PED", "endchat_01", 4.0, 0, 0, 0, 0, 0);
  3472.     return 1;
  3473. }
  3474.  
  3475. CMD:rap(playerid, params[]) {
  3476.     new animid;
  3477.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/rap [1-3]");
  3478.     switch(animid) {
  3479.  
  3480.         case 1: ApplyAnimation(playerid, "RAPPING", "RAP_A_Loop", 4.0, 1, 0, 0, 0, 0);
  3481.         case 2: ApplyAnimation(playerid, "RAPPING", "RAP_B_Loop", 4.0, 1, 0, 0, 0, 0);
  3482.         case 3: ApplyAnimation(playerid, "RAPPING", "RAP_C_Loop", 4.0, 1, 0, 0, 0, 0);
  3483.         default: SendCommandMessage(playerid, COLOR_GREY, "/rap [1-3]");
  3484.     }
  3485.     return 1;
  3486.  }
  3487.  
  3488. CMD:conversar(playerid, params[]) {
  3489.     new animid;
  3490.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/conversar [1-7]");
  3491.     switch(animid) {
  3492.  
  3493.         case 1: ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 0, 0, 0, 0);
  3494.         case 2: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkA", 4.0, 0, 0, 0, 0, 0);
  3495.         case 3: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkB", 4.0, 0, 0, 0, 0, 0);
  3496.         case 4: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkE", 4.0, 0, 0, 0, 0, 0);
  3497.         case 5: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkF", 4.0, 0, 0, 0, 0, 0);
  3498.         case 6: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkG", 4.0, 0, 0, 0, 0, 0);
  3499.         case 7: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkH", 4.0, 0, 0, 0, 0, 0);
  3500.         default: SendCommandMessage(playerid, COLOR_GREY, "/chat [1-7]");
  3501.     }
  3502.     return 1;
  3503. }
  3504.  
  3505. CMD:gestos(playerid, params[]) {
  3506.     new animid;
  3507.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/gestos [1-15]");
  3508.     switch(animid) {
  3509.  
  3510.         case 1: ApplyAnimation(playerid, "GHANDS", "gsign1", 4.0, 0, 0, 0, 0, 0);
  3511.         case 2: ApplyAnimation(playerid, "GHANDS", "gsign1LH", 4.0, 0, 0, 0, 0, 0);
  3512.         case 3: ApplyAnimation(playerid, "GHANDS", "gsign2", 4.0, 0, 0, 0, 0, 0);
  3513.         case 4: ApplyAnimation(playerid, "GHANDS", "gsign2LH", 4.0, 0, 0, 0, 0, 0);
  3514.         case 5: ApplyAnimation(playerid, "GHANDS", "gsign3", 4.0, 0, 0, 0, 0, 0);
  3515.         case 6: ApplyAnimation(playerid, "GHANDS", "gsign3LH", 4.0, 0, 0, 0, 0, 0);
  3516.         case 7: ApplyAnimation(playerid, "GHANDS", "gsign4", 4.0, 0, 0, 0, 0, 0);
  3517.         case 8: ApplyAnimation(playerid, "GHANDS", "gsign4LH", 4.0, 0, 0, 0, 0, 0);
  3518.         case 9: ApplyAnimation(playerid, "GHANDS", "gsign5", 4.0, 0, 0, 0, 0, 0);
  3519.         case 10: ApplyAnimation(playerid, "GHANDS", "gsign5", 4.0, 0, 0, 0, 0, 0);
  3520.         case 11: ApplyAnimation(playerid, "GHANDS", "gsign5LH", 4.0, 0, 0, 0, 0, 0);
  3521.         case 12: ApplyAnimation(playerid, "GANGS", "Invite_No", 4.0, 0, 0, 0, 0, 0);
  3522.         case 13: ApplyAnimation(playerid, "GANGS", "Invite_Yes", 4.0, 0, 0, 0, 0, 0);
  3523.         case 14: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkD", 4.0, 0, 0, 0, 0, 0);
  3524.         case 15: ApplyAnimation(playerid, "GANGS", "smkcig_prtl", 4.0, 0, 0, 0, 0, 0);
  3525.         default: SendCommandMessage(playerid, COLOR_GREY, "/gestos [1-15]");
  3526.     }
  3527.     return 1;
  3528. }
  3529.  
  3530. CMD:deitar(playerid, params[]) {
  3531.     new animid;
  3532.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/deitar [1-3]");
  3533.     switch(animid) {
  3534.  
  3535.         case 1: ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
  3536.         case 2: ApplyAnimation(playerid, "BEACH", "Lay_Bac_Loop", 4.0, 1, 0, 0, 0, 0);
  3537.         case 3: ApplyAnimation(playerid, "BEACH", "SitnWait_loop_W", 4.0, 1, 0, 0, 0, 0);
  3538.         default: SendCommandMessage(playerid, COLOR_GREY, "/deitar [1-3]");
  3539.     }
  3540.     return 1;
  3541. }
  3542.  
  3543. CMD:acenar(playerid, params[]) {
  3544.      new animid;
  3545.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/acenar [1-3]");
  3546.     switch(animid) {
  3547.         case 1: ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0);
  3548.         case 2: ApplyAnimation(playerid, "KISSING", "gfwave2", 4.0, 0, 0, 0, 0, 0);
  3549.         case 3: ApplyAnimation(playerid, "PED", "endchat_03", 4.0, 0, 0, 0, 0, 0);
  3550.         default: SendCommandMessage(playerid, COLOR_GREY, "/acenar [1-3]");
  3551.     }
  3552.     return 1;
  3553. }
  3554.  
  3555. CMD:sinal(playerid, params[]) {
  3556.     new animid;
  3557.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/sinal [1-2]");
  3558.     switch(animid) {
  3559.  
  3560.         case 1: ApplyAnimation(playerid, "POLICE", "CopTraf_Come", 4.0, 0, 0, 0, 0, 0);
  3561.         case 2: ApplyAnimation(playerid, "POLICE", "CopTraf_Stop", 4.0, 0, 0, 0, 0, 0);
  3562.         default: SendCommandMessage(playerid, COLOR_GREY, "/sinal [1-2]");
  3563.     }
  3564.     return 1;
  3565. }
  3566.  
  3567. CMD:cansado(playerid, params[])
  3568.     return cmd_semar(playerid, params);
  3569.  
  3570. CMD:semar(playerid, params[]) {
  3571.     new animid;
  3572.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/semar [1-3]");
  3573.     switch(animid) {
  3574.  
  3575.         case 1: ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
  3576.         case 2: ApplyAnimation(playerid, "PED", "IDLE_tired", 4.0, 1, 0, 0, 0, 0);
  3577.         case 3: ApplyAnimation(playerid, "FAT", "IDLE_tired", 4.0, 1, 0, 0, 0, 0);
  3578.         default: SendCommandMessage(playerid, COLOR_GREY, "/semar [1-3]");
  3579.     }
  3580.     return 1;
  3581. }
  3582.  
  3583. CMD:cair(playerid, params[]) {
  3584.     new animid;
  3585.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/cair [1-3]");
  3586.     switch(animid) {
  3587.  
  3588.         case 1: ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0);
  3589.         case 2: ApplyAnimation(playerid, "PED", "KO_shot_face", 4.0, 0, 1, 1, 1, 0);
  3590.         case 3: ApplyAnimation(playerid, "PED", "KO_shot_stom", 4.0, 0, 1, 1, 1, 0);
  3591.         default: SendCommandMessage(playerid, COLOR_GREY, "/cair [1-3]");
  3592.     }
  3593.     return 1;
  3594. }
  3595.  
  3596. CMD:andar(playerid, params[]) {
  3597.     new animid;
  3598.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/andar [1-26]");
  3599.     switch(animid) {
  3600.  
  3601.         case 1: ApplyAnimation(playerid, "PED", "JOG_femaleA", 4.0, 1, 1, 1, 1, 1);
  3602.         case 2: ApplyAnimation(playerid, "PED", "JOG_maleA", 4.0, 1, 1, 1, 1, 1);
  3603.         case 3: ApplyAnimation(playerid, "PED", "WOMAN_walkfatold", 4.0, 1, 1, 1, 1, 1);
  3604.         case 4: ApplyAnimation(playerid, "PED", "run_fat", 4.0, 1, 1, 1, 1, 1);
  3605.         case 5: ApplyAnimation(playerid, "PED", "run_fatold", 4.0, 1, 1, 1, 1, 1);
  3606.         case 6: ApplyAnimation(playerid, "PED", "run_old", 4.0, 1, 1, 1, 1, 1);
  3607.         case 7: ApplyAnimation(playerid, "PED", "Run_Wuzi", 4.0, 1, 1, 1, 1, 1);
  3608.         case 8: ApplyAnimation(playerid, "PED", "swat_run", 4.0, 1, 1, 1, 1, 1);
  3609.         case 9: ApplyAnimation(playerid, "PED", "WALK_fat", 4.0, 1, 1, 1, 1, 1);
  3610.         case 10: ApplyAnimation(playerid, "PED", "WALK_fatold", 4.0, 1, 1, 1, 1, 1);
  3611.         case 11: ApplyAnimation(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1);
  3612.         case 12: ApplyAnimation(playerid, "PED", "WALK_gang2", 4.0, 1, 1, 1, 1, 1);
  3613.         case 13: ApplyAnimation(playerid, "PED", "WALK_old", 4.0, 1, 1, 1, 1, 1);
  3614.         case 14: ApplyAnimation(playerid, "PED", "WALK_shuffle", 4.0, 1, 1, 1, 1, 1);
  3615.         case 15: ApplyAnimation(playerid, "PED", "woman_run", 4.0, 1, 1, 1, 1, 1);
  3616.         case 16: ApplyAnimation(playerid, "PED", "WOMAN_runbusy", 4.0, 1, 1, 1, 1, 1);
  3617.         case 17: ApplyAnimation(playerid, "PED", "WOMAN_runfatold", 4.0, 1, 1, 1, 1, 1);
  3618.         case 18: ApplyAnimation(playerid, "PED", "woman_runpanic", 4.0, 1, 1, 1, 1, 1);
  3619.         case 19: ApplyAnimation(playerid, "PED", "WOMAN_runsexy", 4.0, 1, 1, 1, 1, 1);
  3620.         case 20: ApplyAnimation(playerid, "PED", "WOMAN_walkbusy", 4.0, 1, 1, 1, 1, 1);
  3621.         case 21: ApplyAnimation(playerid, "PED", "WOMAN_walkfatold", 4.0, 1, 1, 1, 1, 1);
  3622.         case 22: ApplyAnimation(playerid, "PED", "WOMAN_walknorm", 4.0, 1, 1, 1, 1, 1);
  3623.         case 23: ApplyAnimation(playerid, "PED", "WOMAN_walkold", 4.0, 1, 1, 1, 1, 1);
  3624.         case 24: ApplyAnimation(playerid, "PED", "WOMAN_walkpro", 4.0, 1, 1, 1, 1, 1);
  3625.         case 25: ApplyAnimation(playerid, "PED", "WOMAN_walksexy", 4.0, 1, 1, 1, 1, 1);
  3626.         case 26: ApplyAnimation(playerid, "PED", "WOMAN_walkshop", 4.0, 1, 1, 1, 1, 1);
  3627.         default: SendCommandMessage(playerid, COLOR_GREY, "/andar [1-26]");
  3628.     }
  3629.     return 1;
  3630. }
  3631.  
  3632. CMD:loco(playerid, params[]) {
  3633.     new animid;
  3634.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/loco [1-9]");
  3635.     switch(animid) {
  3636.  
  3637.         case 1: ApplyAnimation(playerid, "DANCING", "DAN_Down_A", 4.0, 1, 0, 0, 0, 0);
  3638.         case 2: ApplyAnimation(playerid, "DANCING", "DAN_Left_A", 4.0, 1, 0, 0, 0, 0);
  3639.         case 3: ApplyAnimation(playerid, "DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0);
  3640.         case 4: ApplyAnimation(playerid, "DANCING", "DAN_Right_A", 4.0, 1, 0, 0, 0, 0);
  3641.         case 5: ApplyAnimation(playerid, "DANCING", "DAN_Up_A", 4.0, 1, 0, 0, 0, 0);
  3642.         case 6: ApplyAnimation(playerid, "DANCING", "dnce_M_a", 4.0, 1, 0, 0, 0, 0);
  3643.         case 7: ApplyAnimation(playerid, "DANCING", "dnce_M_b", 4.0, 1, 0, 0, 0, 0);
  3644.         case 8: ApplyAnimation(playerid, "DANCING", "dnce_M_c", 4.0, 1, 0, 0, 0, 0);
  3645.         case 9: ApplyAnimation(playerid, "DANCING", "dnce_M_d", 4.0, 1, 0, 0, 0, 0);
  3646.         default: SendCommandMessage(playerid, COLOR_GREY, "/loco [1-9]");
  3647.     }
  3648.     return 1;
  3649. }
  3650.  
  3651. CMD:strip(playerid, params[]) {
  3652.     new animid;
  3653.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/strip [1-2]");
  3654.     switch(animid) {
  3655.  
  3656.         case 1: ApplyAnimation(playerid, "STRIP", "PLY_CASH", 4.0, 0, 0, 0, 0, 0);
  3657.         case 2: ApplyAnimation(playerid, "STRIP", "PUN_CASH", 4.0, 0, 0, 0, 0, 0);
  3658.         default: SendCommandMessage(playerid, COLOR_GREY, "/strip [1-2]");
  3659.     }
  3660.     return 1;
  3661. }
  3662.  
  3663. CMD:fumar(playerid, params[]) {
  3664.     new animid;
  3665.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/fumar [1-3]");
  3666.     switch(animid) {
  3667.  
  3668.         case 1: ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.0, 0, 0, 0, 0, 0);
  3669.         case 2: ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
  3670.         case 3: SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  3671.         default: SendCommandMessage(playerid, COLOR_GREY, "/fumar [1-2]");
  3672.     }
  3673.     return 1;
  3674. }
  3675.  
  3676. CMD:dj(playerid, params[]) {
  3677.     new animid;
  3678.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/dj [1-4]");
  3679.     switch(animid) {
  3680.  
  3681.         case 1: ApplyAnimation(playerid, "SCRATCHING", "scdldlp", 4.0, 1, 0, 0, 0, 0);
  3682.         case 2: ApplyAnimation(playerid, "SCRATCHING", "scdlulp", 4.0, 1, 0, 0, 0, 0);
  3683.         case 3: ApplyAnimation(playerid, "SCRATCHING", "scdrdlp", 4.0, 1, 0, 0, 0, 0);
  3684.         case 4: ApplyAnimation(playerid, "SCRATCHING", "scdrulp", 4.0, 1, 0, 0, 0, 0);
  3685.         default: SendCommandMessage(playerid, COLOR_GREY, "/dj [1-4]");
  3686.     }
  3687.     return 1;
  3688. }
  3689.  
  3690. CMD:recarregar(playerid, params[]) {
  3691.     new animid;
  3692.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/recarregar - 1 (Pistola), 2 (Espingarda), 3 (Metralhadora/Fuzil)");
  3693.     switch(animid) {
  3694.         case 1: ApplyAnimation(playerid, "PYTHON", "python_reload", 4.0, 0, 0, 0, 0, 0);
  3695.         case 2: ApplyAnimation(playerid, "BUDDY", "buddy_reload", 4.0, 0, 0, 0, 0, 0);
  3696.         case 3: ApplyAnimation(playerid, "UZI", "UZI_reload", 4.0,0,0,0,0,0);
  3697.         default: SendCommandMessage(playerid, COLOR_GREY, "/recarregar - 1 (Pistola), 2 (Espingarda), 3 (Metralhadora/Fuzil)");
  3698.     }
  3699.     return 1;
  3700. }
  3701.  
  3702. CMD:pixar(playerid, params[]) {
  3703.     new animid;
  3704.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/pixar [1-2]");
  3705.     switch(animid) {
  3706.  
  3707.         case 1: ApplyAnimation(playerid, "GRAFFITI", "graffiti_Chkout", 4.0, 0, 0, 0, 0, 0);
  3708.         case 2: ApplyAnimation(playerid, "GRAFFITI", "spraycan_fire", 4.0, 0, 0, 0, 0, 0);
  3709.         default: SendCommandMessage(playerid, COLOR_GREY, "/pixar [1-2]");
  3710.     }
  3711.     return 1;
  3712. }
  3713.  
  3714. CMD:negociar(playerid, params[]) {
  3715.     new animid;
  3716.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/negociar [1-2]");
  3717.     switch(animid) {
  3718.  
  3719.         case 1: ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0);
  3720.         case 2: ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);
  3721.         default: SendCommandMessage(playerid, COLOR_GREY, "/negociar [1-2]");
  3722.     }
  3723.     return 1;
  3724. }
  3725.  
  3726. CMD:stopanim(playerid, params[])
  3727.     return cmd_pararanim(playerid, params);
  3728.  
  3729. CMD:stopani(playerid, params[])
  3730.     return cmd_pararanim(playerid, params);
  3731.  
  3732. CMD:pararanim(playerid, params[]) {
  3733.     format(_largestring, 1280, "%s - /pararanim %s", ReturnFullName(playerid), params);
  3734.     CommandLog(_largestring);
  3735.     if(GetPlayerState(playerid) == 1) {
  3736.         ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
  3737.         SendWarningMessage(playerid, COLOR_WHITE, "Animações paradas.");
  3738.         ClearAnimations(playerid);
  3739.         TogglePlayerControllable(playerid, 1);
  3740.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  3741.     }
  3742.     else SendClientMessage(playerid, COLOR_GREY, "Você não pode fazer isso.");
  3743.     return 1;
  3744. }
  3745.  
  3746. CMD:crossarms(playerid, params[])
  3747.     return cmd_cruzarbracos(playerid, params);
  3748.  
  3749. CMD:cruzarbracos(playerid, params[]) {
  3750.     new animid;
  3751.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/cruzarbracos [1-4]");
  3752.     switch(animid) {
  3753.  
  3754.         case 1: ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
  3755.         case 2: ApplyAnimation(playerid, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0);
  3756.         case 3: ApplyAnimation(playerid, "GRAVEYARD", "mrnM_loop", 4.0, 1, 0, 0, 0, 0);
  3757.         case 4: ApplyAnimation(playerid, "GRAVEYARD", "prst_loopa", 4.0, 1, 0, 0, 0, 0);
  3758.         default: SendCommandMessage(playerid, COLOR_GREY, "/cruzarbracos [1-4]");
  3759.     }
  3760.     return 1;
  3761. }
  3762.  
  3763. CMD:taco(playerid, params[]) {
  3764.     new animid;
  3765.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/taco [1-2]");
  3766.     switch(animid) {
  3767.         case 1: ApplyAnimation(playerid, "CRACK", "Bbalbat_Idle_01", 4.0, 1, 0, 0, 0, 0);
  3768.         case 2: ApplyAnimation(playerid, "CRACK", "Bbalbat_Idle_02", 4.0, 1, 0, 0, 0, 0);
  3769.         default: SendCommandMessage(playerid, COLOR_GREY, "/taco [1-2]");
  3770.     }
  3771.     return 1;
  3772. }
  3773.  
  3774. CMD:comemorar(playerid, params[]) {
  3775.     new animid;
  3776.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/comemorar [1-8]");
  3777.     switch(animid) {
  3778.  
  3779.         case 1: ApplyAnimation(playerid, "ON_LOOKERS", "shout_01", 4.0, 0, 0, 0, 0, 0);
  3780.         case 2: ApplyAnimation(playerid, "ON_LOOKERS", "shout_02", 4.0, 0, 0, 0, 0, 0);
  3781.         case 3: ApplyAnimation(playerid, "ON_LOOKERS", "shout_in", 4.0, 0, 0, 0, 0, 0);
  3782.         case 4: ApplyAnimation(playerid, "RIOT", "RIOT_ANGRY_B", 4.0, 1, 0, 0, 0, 0);
  3783.         case 5: ApplyAnimation(playerid, "RIOT", "RIOT_CHANT", 4.0, 0, 0, 0, 0, 0);
  3784.         case 6: ApplyAnimation(playerid, "RIOT", "RIOT_shout", 4.0, 0, 0, 0, 0, 0);
  3785.         case 7: ApplyAnimation(playerid, "STRIP", "PUN_HOLLER", 4.0, 0, 0, 0, 0, 0);
  3786.         case 8: ApplyAnimation(playerid, "OTB", "wtchrace_win", 4.0, 0, 0, 0, 0, 0);
  3787.         default: SendCommandMessage(playerid, COLOR_GREY, "/comemorar [1-8]");
  3788.     }
  3789.     return 1;
  3790. }
  3791.  
  3792. CMD:sentar(playerid, params[]) {
  3793.     new animid;
  3794.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/sentar [1-6]");
  3795.     switch(animid) {
  3796.  
  3797.         case 1: ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
  3798.         case 2: ApplyAnimation(playerid, "BEACH", "Lay_Bac_Loop", 4.0, 1, 0, 0, 0, 0);
  3799.         case 3: ApplyAnimation(playerid, "BEACH", "ParkSit_W_loop", 4.0, 1, 0, 0, 0, 0);
  3800.         case 4: ApplyAnimation(playerid, "BEACH", "SitnWait_loop_W", 4.0, 1, 0, 0, 0, 0);
  3801.         case 5: ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
  3802.         case 6: ApplyAnimation(playerid, "PED", "SEAT_down", 4.0, 0, 1, 1, 1, 0);
  3803.         default: SendCommandMessage(playerid, COLOR_GREY, "/sentar [1-6]");
  3804.     }
  3805.     return 1;
  3806. }
  3807.  
  3808. CMD:comersentado(playerid, params[]) {
  3809.     new animid;
  3810.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/comersentado [1-2]");
  3811.     switch(animid) {
  3812.  
  3813.         case 1: ApplyAnimation(playerid, "FOOD", "FF_Sit_Eat3", 4.0, 1, 0, 0, 0, 0);
  3814.         case 2: ApplyAnimation(playerid, "FOOD", "FF_Sit_Eat2", 4.0, 1, 0, 0, 0, 0);
  3815.         default: SendCommandMessage(playerid, COLOR_GREY, "/comersentado [1-2]");
  3816.     }
  3817.     return 1;
  3818. }
  3819.  
  3820. CMD:bar(playerid, params[]) {
  3821.     new animid;
  3822.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/bar [1-5]");
  3823.     switch(animid) {
  3824.  
  3825.         case 1: ApplyAnimation(playerid, "BAR", "Barcustom_get", 4.0, 0, 1, 0, 0, 0);
  3826.         case 2: ApplyAnimation(playerid, "BAR", "Barserve_bottle", 4.0, 0, 0, 0, 0, 0);
  3827.         case 3: ApplyAnimation(playerid, "BAR", "Barserve_give", 4.0, 0, 0, 0, 0, 0);
  3828.         case 4: ApplyAnimation(playerid, "BAR", "dnk_stndM_loop", 4.0, 0, 0, 0, 0, 0);
  3829.         case 5: ApplyAnimation(playerid, "BAR", "BARman_idle", 4.0, 0, 0, 0, 0, 0);
  3830.         default: SendCommandMessage(playerid, COLOR_GREY, "/bar [1-5]");
  3831.     }
  3832.     return 1;
  3833. }
  3834.  
  3835. CMD:dancar(playerid, params[]) {
  3836.     new animid;
  3837.     if(sscanf(params,"d",animid)) return SendCommandMessage(playerid, COLOR_GREY, "/dancar [1-4]");
  3838.     switch(animid) {
  3839.  
  3840.         case 1: SetPlayerSpecialAction(playerid, 5);
  3841.         case 2: SetPlayerSpecialAction(playerid, 6);
  3842.         case 3: SetPlayerSpecialAction(playerid, 7);
  3843.         case 4: SetPlayerSpecialAction(playerid, 8);
  3844.         default: SendCommandMessage(playerid, COLOR_GREY, "/dancar [style 1-4]");
  3845.     }
  3846.     return 1;
  3847. }
  3848.  
  3849. CMD:pegarip(playerid, params[])
  3850. {
  3851.     format(_largestring, 1280, "%s - /pegarip %s", ReturnFullName(playerid), params);
  3852.     CommandLog(_largestring);
  3853.     new otherplayerid, otherplayerip[16];
  3854.     if (sscanf(params, "u", otherplayerid))
  3855.     {
  3856.         format(_string, sizeof (_string), "\"/%s [id/nome]\"", Command_GetDisplayNamed("pegarip", playerid));
  3857.         return SendCommandMessage(playerid, -1, _string);
  3858.     }
  3859.     if(PlayerInfo[playerid][pAdmin] >= 1)
  3860.     {
  3861.         GetPlayerIp(otherplayerid, otherplayerip, 16);
  3862.         format(_string, sizeof(_string), "[SYS] Jogador: %s (%d) - IP: \"%s\"", ReturnPlayerNameEx(otherplayerid), otherplayerid, otherplayerip);
  3863.         SendClientMessage(playerid, COLOR_SYSTEM, _string);
  3864.         return 1;
  3865.     }
  3866.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  3867. }
  3868.  
  3869. CMD:desbanirip(playerid, params[])
  3870. {
  3871.     format(_largestring, 1280, "%s - /desbanirip %s", ReturnFullName(playerid), params);
  3872.     CommandLog(_largestring);
  3873.     new unbanip[16];
  3874.     if (sscanf(params, "s[16]", unbanip))
  3875.     {
  3876.         format(_string, sizeof (_string), "\"/%s [ip]\"", Command_GetDisplayNamed("desbanirip", playerid));
  3877.         return SendCommandMessage(playerid, -1, _string);
  3878.     }
  3879.     if(PlayerInfo[playerid][pAdmin] >= 1)
  3880.     {
  3881.         format(_string, sizeof(_string), "unbanip %s", unbanip);
  3882.         SendRconCommand(_string);
  3883.         SendRconCommand("reloadbans");
  3884.         format(_string, sizeof(_string), "%s desbaniu o IP: \"%s\"", ReturnPlayerNameEx(playerid), unbanip);
  3885.         AdminWarning(COLOR_WHITE, _string);
  3886.         return 1;
  3887.     }
  3888.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  3889. }
  3890.  
  3891. CMD:explodir(playerid, params[])
  3892. {
  3893.     format(_largestring, 1280, "%s - /explodir %s", ReturnFullName(playerid), params);
  3894.     CommandLog(_largestring);
  3895.     new otherplayerid;
  3896.     if (sscanf(params, "u", otherplayerid))
  3897.     {
  3898.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("explodir", playerid));
  3899.         return SendCommandMessage(playerid, -1, _string);
  3900.     }
  3901.     if(PlayerInfo[playerid][pAdmin] >= 3)
  3902.     {
  3903.         new Float:boomx, Float:boomy, Float:boomz;
  3904.         GetPlayerPos(otherplayerid,boomx, boomy, boomz);
  3905.         CreateExplosion(boomx, boomy , boomz, 7, 10);
  3906.         format(_string, sizeof(_string), "%s explodiu %s (%d).", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), otherplayerid);
  3907.         AdminWarning(COLOR_WHITE, _string);
  3908.         format(_string, 128, "%s (%d) lhe explodiu.", ReturnPlayerNameEx(playerid), playerid);
  3909.         SendWarningMessage(playerid, -1, _string);
  3910.         return 1;
  3911.     }
  3912.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  3913. }
  3914.  
  3915. CMD:checararmas(playerid, params[])
  3916. {
  3917.     format(_largestring, 1280, "%s - /checararmas %s", ReturnFullName(playerid), params);
  3918.     CommandLog(_largestring);
  3919.     new otherplayerid;
  3920.     if (sscanf(params, "u", otherplayerid))
  3921.     {
  3922.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("checararmas", playerid));
  3923.         return SendCommandMessage(playerid, -1, _string);
  3924.     }
  3925.     if(PlayerInfo[playerid][pAdmin] >= 1)
  3926.     {
  3927.         format(_string, sizeof(_string), "%s tem as seguintes armas:", ReturnPlayerNameEx(otherplayerid));
  3928.         SendClientMessage(playerid, COLOR_SYSTEM, _string);
  3929.         format(_string, sizeof(_string), "Arma 1: %s || Munição: %d", ReturnWeaponName(PlayerInfo[playerid][pGun1]), PlayerInfo[playerid][pAmmo1]);
  3930.         SendClientMessage(playerid, COLOR_SYSTEM, _string);
  3931.         format(_string, sizeof(_string), "Arma 2: %s || Munição: %d", ReturnWeaponName(PlayerInfo[playerid][pGun2]), PlayerInfo[playerid][pAmmo2]);
  3932.         SendClientMessage(playerid, COLOR_SYSTEM, _string);
  3933.         format(_string, sizeof(_string), "Arma 3: %s || Munição: %d", ReturnWeaponName(PlayerInfo[playerid][pGun3]), PlayerInfo[playerid][pAmmo3]);
  3934.         SendClientMessage(playerid, COLOR_SYSTEM, _string);
  3935.         return 1;
  3936.     }
  3937.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  3938. }
  3939.  
  3940. CMD:carid(playerid, params[])
  3941.     return cmd_iddocarro(playerid, params);
  3942.  
  3943. CMD:vehid(playerid, params[])
  3944.     return cmd_iddocarro(playerid, params);
  3945.  
  3946. CMD:idcar(playerid, params[])
  3947.     return cmd_iddocarro(playerid, params);
  3948.  
  3949. CMD:iddocarro(playerid, params[]) {
  3950.     format(_largestring, 1280, "%s - /iddocarro %s", ReturnFullName(playerid), params);
  3951.     CommandLog(_largestring);
  3952.     if(IsPlayerInAnyVehicle(playerid)) {
  3953.         format(_string, 128, "ID deste veículo: %i || Modelo: %i.", GetPlayerVehicleID(playerid), GetVehicleModel(GetPlayerVehicleID(playerid)));
  3954.         SendWarningMessage(playerid, COLOR_WHITE, _string);
  3955.     }
  3956.     else SendClientMessage(playerid, COLOR_GREY, "Você não está em um veículo.");
  3957.     return 1;
  3958. }
  3959.  
  3960. CMD:ar(playerid, params[])
  3961.     return cmd_aceitarrelatorio(playerid, params);
  3962.  
  3963. CMD:aceitarrelatorio(playerid, params[])
  3964. {
  3965.     format(_largestring, 1280, "%s - /aceitarrelatorio %s", ReturnFullName(playerid), params);
  3966.     CommandLog(_largestring);
  3967.     new otherplayerid;
  3968.     if (sscanf(params, "u", otherplayerid))
  3969.     {
  3970.         format(_string, sizeof (_string), "\"/%s [id/nome]\"", Command_GetDisplayNamed("aceitarrelatorio", playerid));
  3971.         return SendCommandMessage(playerid, -1, _string);
  3972.     }
  3973.     if(PlayerInfo[playerid][pAdmin] >= 1)
  3974.     {
  3975.         if(!GetPVarInt(otherplayerid, "PlayerReported")) return SendErrorMessage(playerid, -1, "Este jogador não mandou um relatório!");
  3976.         DeletePVar(otherplayerid, "PlayerReported");
  3977.         format(_string, sizeof(_string), "%s aceitou o relatório de %s (%d)", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), otherplayerid);
  3978.         AdminWarning(COLOR_SYSTEM, _string);
  3979.         format(_string, sizeof(_string), "%s {00CF00}aceitou{AFAFAF} seu relatório. Em instantes, ele entrará em contato com você.", ReturnPlayerNameEx(playerid));
  3980.         SendWarningMessage(otherplayerid, COLOR_SYSTEM, _string);
  3981.         return 1;
  3982.     }
  3983.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  3984. }
  3985.  
  3986. CMD:rr(playerid, params[])
  3987.     return cmd_rejeitarrelatorio(playerid, params);
  3988.  
  3989. CMD:rejeitarrelatorio(playerid, params[])
  3990. {
  3991.     format(_largestring, 1280, "%s - /rejeitarrelatorio %s", ReturnFullName(playerid), params);
  3992.     CommandLog(_largestring);
  3993.     new otherplayerid;
  3994.     if (sscanf(params, "u", otherplayerid))
  3995.     {
  3996.         format(_string, sizeof (_string), "\"/%s [id/nome]\"", Command_GetDisplayNamed("rejeitarrelatorio", playerid));
  3997.         return SendCommandMessage(playerid, -1, _string);
  3998.     }
  3999.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4000.     {
  4001.         if(!GetPVarInt(otherplayerid, "PlayerReported")) return SendErrorMessage(playerid, -1, "Este jogador não mandou um relatório!");
  4002.         DeletePVar(otherplayerid, "PlayerReported");
  4003.         format(_string, sizeof(_string), "%s rejeitou o relatório de %s (%d)", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), otherplayerid);
  4004.         AdminWarning(COLOR_SYSTEM, _string);
  4005.         format(_string, sizeof(_string), "%s {CF0000}rejeitou{AFAFAF} seu relatório. Em instantes, ele entrará em contato com você.", ReturnPlayerNameEx(playerid));
  4006.         SendWarningMessage(otherplayerid, COLOR_SYSTEM, _string);
  4007.         return 1;
  4008.     }
  4009.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4010. }
  4011.  
  4012. CMD:aj(playerid, params[])
  4013.     return cmd_aceitarajuda(playerid, params);
  4014.  
  4015. CMD:aceitarajuda(playerid, params[])
  4016. {
  4017.     format(_largestring, 1280, "%s - /aceitarajuda %s", ReturnFullName(playerid), params);
  4018.     CommandLog(_largestring);
  4019.     new otherplayerid;
  4020.     if (sscanf(params, "u", otherplayerid))
  4021.     {
  4022.         format(_string, sizeof (_string), "\"/%s [id/nome]\"", Command_GetDisplayNamed("aceitarajuda", playerid));
  4023.         return SendCommandMessage(playerid, -1, _string);
  4024.     }
  4025.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4026.     {
  4027.         if(!GetPVarInt(otherplayerid, "PlayerReported")) return SendErrorMessage(playerid, -1, "Este jogador não mandou um pedido de ajuda!");
  4028.         DeletePVar(otherplayerid, "PlayerReported");
  4029.         format(_string, sizeof(_string), "%s atendeu o pedido de ajuda de %s (%d)", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), otherplayerid);
  4030.         AdminWarning(COLOR_SYSTEM, _string);
  4031.         format(_string, sizeof(_string), "%s atendeu a seu pedido de ajuda, e entrará em contato com você em instantes.", ReturnPlayerNameEx(playerid));
  4032.         SendWarningMessage(otherplayerid, COLOR_SYSTEM, _string);
  4033.         return 1;
  4034.     }
  4035.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4036. }
  4037.  
  4038. CMD:salvarcontas(playerid, params[])
  4039. {
  4040.     format(_largestring, 1280, "%s - /salvarcontas %s", ReturnFullName(playerid), params);
  4041.     CommandLog(_largestring);
  4042.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4043.     {
  4044.         SaveAccounts();
  4045.         format(_string, sizeof(_string), "%s salvou todas as contas do servidor.", ReturnPlayerNameEx(playerid));
  4046.         AdminWarning(COLOR_SYSTEM, _string);
  4047.         format(_string, sizeof(_string), "[SYS] Todas as contas do servidor foram salvas por %s.", ReturnPlayerNameEx(playerid));
  4048.         OOCMessage(COLOR_SYSTEM, _string);
  4049.         return 1;
  4050.     }
  4051.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4052. }
  4053.  
  4054. CMD:o(playerid, params[])
  4055.     return cmd_ooc(playerid, params);
  4056.  
  4057. CMD:ooc(playerid, params[])
  4058. {
  4059.     format(_largestring, 1280, "%s - /ooc %s", ReturnFullName(playerid), params);
  4060.     CommandLog(_largestring);
  4061.     new text[128];
  4062.     if (sscanf(params, "s[128]", text))
  4063.     {
  4064.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("ooc", playerid));
  4065.         return SendCommandMessage(playerid, -1, _string);
  4066.     }
  4067.     if(!GetPVarInt(playerid, "Muted") && gOOC)
  4068.     {
  4069.         format(_string, sizeof(_string), "[OOC] %s [%d]: %s", ReturnPlayerNameEx(playerid), playerid, text);
  4070.         OOCMessage(COLOR_OOC, _string);
  4071.         return 1;
  4072.     }
  4073.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4074. }
  4075.  
  4076. CMD:desligarooc(playerid, params[])
  4077.     return cmd_noooc(playerid, params);
  4078.  
  4079. CMD:noooc(playerid, params[])
  4080. {
  4081.     format(_largestring, 1280, "%s - /noooc %s", ReturnFullName(playerid), params);
  4082.     CommandLog(_largestring);
  4083.     if(PlayerInfo[playerid][pAdmin] < 1) return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4084.     if(gOOC)
  4085.     {
  4086.         gOOC = 0;
  4087.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s acaba de {CF0000}desligar{AFAFAF} o chat OOC!", ReturnPlayerNameEx(playerid));
  4088.         OOCMessage(COLOR_OOC, _string);
  4089.         return 1;
  4090.     }
  4091.     else
  4092.     {
  4093.         gOOC = 1;
  4094.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s acaba de {00CF00}ligar{AFAFAF} o chat OOC!", ReturnPlayerNameEx(playerid));
  4095.         OOCMessage(COLOR_OOC, _string);
  4096.         return 1;
  4097.     }
  4098.  
  4099. }
  4100.  
  4101. CMD:ao(playerid, params[])
  4102.     return cmd_adminooc(playerid, params);
  4103.  
  4104. CMD:aooc(playerid, params[])
  4105.     return cmd_adminooc(playerid, params);
  4106.  
  4107. CMD:adminooc(playerid, params[])
  4108. {
  4109.     format(_largestring, 1280, "%s - /adminooc %s", ReturnFullName(playerid), params);
  4110.     CommandLog(_largestring);
  4111.     new text[128];
  4112.     if (sscanf(params, "s[128]", text))
  4113.     {
  4114.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("adminooc", playerid));
  4115.         return SendCommandMessage(playerid, -1, _string);
  4116.     }
  4117.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4118.     {
  4119.         format(_string, sizeof(_string), "{AFAFAF}[AW] %s [%d]: {A9C4E4}%s", ReturnPlayerNameEx(playerid), playerid, text);
  4120.         OOCMessage(COLOR_OOC, _string);
  4121.         return 1;
  4122.     }
  4123.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4124. }
  4125.  
  4126. CMD:rg(playerid, params[])
  4127.     return cmd_stats(playerid, params);
  4128.  
  4129. CMD:stats(playerid, params[]) {
  4130.     format(_largestring, 1280, "%s - /stats %s", ReturnFullName(playerid), params);
  4131.     CommandLog(_largestring);
  4132.     ShowStats(playerid,playerid);
  4133.     return 1;
  4134. }
  4135.  
  4136. CMD:checar(playerid, params[])
  4137. {
  4138.     format(_largestring, 1280, "%s - /checar %s", ReturnFullName(playerid), params);
  4139.     CommandLog(_largestring);
  4140.     new otherplayerid;
  4141.     if (sscanf(params, "u", otherplayerid))
  4142.     {
  4143.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("checar", playerid));
  4144.         return SendCommandMessage(playerid, -1, _string);
  4145.     }
  4146.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4147.     {
  4148.         ShowStats(playerid,otherplayerid);
  4149.         return 1;
  4150.     }
  4151.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4152. }
  4153.  
  4154. CMD:lerooc(playerid, params[]) {
  4155.  
  4156.     format(_largestring, 1280, "%s - /lerooc %s", ReturnFullName(playerid), params);
  4157.     CommandLog(_largestring);
  4158.     if(GetPVarInt(playerid, "OOC"))
  4159.     {
  4160.         DeletePVar(playerid, "OOC");
  4161.         SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler as mensagens do chat Out of Character Globais.");
  4162.     }
  4163.     else
  4164.     {
  4165.         SetPVarInt(playerid, "OOC", 1);
  4166.         SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler mensagens do chat Out of Character Globais.");
  4167.     }
  4168.     return 1;
  4169. }
  4170.  
  4171. CMD:lerfam(playerid, params[]) {
  4172.  
  4173.     format(_largestring, 1280, "%s - /lerfam %s", ReturnFullName(playerid), params);
  4174.     CommandLog(_largestring);
  4175.     if(GetPVarInt(playerid, "FAC"))
  4176.     {
  4177.         DeletePVar(playerid, "FAC");
  4178.         SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler as mensagens do chat Out of Character de sua facção.");
  4179.     }
  4180.     else
  4181.     {
  4182.         SetPVarInt(playerid, "FAC", 1);
  4183.         SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler mensagens do chat Out of Character de sua facção.");
  4184.     }
  4185.     return 1;
  4186. }
  4187.  
  4188. CMD:lerpm(playerid, params[]) {
  4189.  
  4190.     format(_largestring, 1280, "%s - /lerpm %s", ReturnFullName(playerid), params);
  4191.     CommandLog(_largestring);
  4192.     if(GetPVarInt(playerid, "PM"))
  4193.     {
  4194.         DeletePVar(playerid, "PM");
  4195.         SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler as mensagens particulares.");
  4196.     }
  4197.     else
  4198.     {
  4199.         SetPVarInt(playerid, "PM", 1);
  4200.         SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler mensagens particulares.");
  4201.     }
  4202.     return 1;
  4203. }
  4204.  
  4205. CMD:verpm(playerid, params[])
  4206. {
  4207.  
  4208.     format(_largestring, 1280, "%s - /verpm %s", ReturnFullName(playerid), params);
  4209.     CommandLog(_largestring);
  4210.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4211.     {
  4212.         if(GetPVarInt(playerid, "LerPM"))
  4213.         {
  4214.             DeletePVar(playerid, "LerPM");
  4215.             SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler as mensagens particulares de todo mundo.");
  4216.         }
  4217.         else
  4218.         {
  4219.             SetPVarInt(playerid, "LerPM", 1);
  4220.             SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler mensagens particulares de todo mundo.");
  4221.         }
  4222.     }
  4223.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4224.     return 1;
  4225. }
  4226.  
  4227. CMD:togcanim(playerid, params[])
  4228.     return cmd_chatanim(playerid, params);
  4229.  
  4230. CMD:chatanim(playerid, params[]) {
  4231.  
  4232.     format(_largestring, 1280, "%s - /chatanim %s", ReturnFullName(playerid), params);
  4233.     CommandLog(_largestring);
  4234.     if(GetPVarInt(playerid, "ChatAnim"))
  4235.     {
  4236.         DeletePVar(playerid, "ChatAnim");
  4237.         SendWarningMessage(playerid, COLOR_GRAD2, "Você desabilitou a animação automática de chat.");
  4238.     }
  4239.     else
  4240.     {
  4241.         SetPVarInt(playerid, "ChatAnim", 1);
  4242.         SendWarningMessage(playerid, COLOR_GRAD2, "Você habilitou a animação automática de chat.");
  4243.     }
  4244.     return 1;
  4245. }
  4246.  
  4247. CMD:lac(playerid, params[])
  4248.     return cmd_leradminchat(playerid, params);
  4249.  
  4250. CMD:leradminchat(playerid, params[])
  4251. {
  4252.     format(_largestring, 1280, "%s - /leradminchat %s", ReturnFullName(playerid), params);
  4253.     CommandLog(_largestring);
  4254.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4255.     {
  4256.         if(GetPVarInt(playerid, "ReadAdminChat"))
  4257.         {
  4258.             DeletePVar(playerid, "ReadAdminChat");
  4259.             SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler o chat de Administração.");
  4260.             format(_string, 128, "%s (%d) desativou a leitura do chat administrativo.", ReturnPlayerNameEx(playerid), playerid);
  4261.             AdminWarning(COLOR_YELLOW, _string);
  4262.         }
  4263.         else
  4264.         {
  4265.             SetPVarInt(playerid, "ReadAdminChat", 1);
  4266.             SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler o chat de Administração.");
  4267.             format(_string, 128, "%s (%d) ativou a leitura do chat administrativo.", ReturnPlayerNameEx(playerid), playerid);
  4268.             AdminWarning(COLOR_YELLOW, _string);
  4269.         }
  4270.     }
  4271.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4272.     return 1;
  4273. }
  4274.  
  4275. CMD:law(playerid, params[])
  4276.     return cmd_leradminwarning(playerid, params);
  4277.  
  4278. CMD:leradminwarning(playerid, params[]) {
  4279.     format(_largestring, 1280, "%s - /leradminwarning %s", ReturnFullName(playerid), params);
  4280.     CommandLog(_largestring);
  4281.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4282.     {
  4283.         if(GetPVarInt(playerid, "ReadAdminWarning"))
  4284.         {
  4285.             DeletePVar(playerid, "ReadAdminWarning");
  4286.             SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler os avisos administrativos.");
  4287.             format(_string, 128, "%s (%d) desativou a leitura dos avisos administrativos.", ReturnPlayerNameEx(playerid), playerid);
  4288.             AdminWarning(COLOR_YELLOW, _string);
  4289.         }
  4290.         else
  4291.         {
  4292.             SetPVarInt(playerid, "ReadAdminWarning", 1);
  4293.             SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler os avisos administrativos.");
  4294.             format(_string, 128, "%s (%d) ativou a leitura dos avisos administrativos.", ReturnPlayerNameEx(playerid), playerid);
  4295.             AdminWarning(COLOR_YELLOW, _string);
  4296.         }
  4297.     }
  4298.     return 1;
  4299. }
  4300.  
  4301. CMD:lsw(playerid, params[])
  4302.     return cmd_lersystemwarning(playerid, params);
  4303.  
  4304. CMD:lersystemwarning(playerid, params[]) {
  4305.     format(_largestring, 1280, "%s - /lersystemwarning %s", ReturnFullName(playerid), params);
  4306.     CommandLog(_largestring);
  4307.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4308.     {
  4309.         if(GetPVarInt(playerid, "ReadSystemWarning"))
  4310.         {
  4311.             DeletePVar(playerid, "ReadSystemWarning");
  4312.             SendWarningMessage(playerid, COLOR_GRAD2, "Você não irá mais ler os avisos do sistema.");
  4313.             format(_string, 128, "%s (%d) desativou a leitura dos avisos do sistema.", ReturnPlayerNameEx(playerid), playerid);
  4314.             AdminWarning(COLOR_YELLOW, _string);
  4315.         }
  4316.         else
  4317.         {
  4318.             SetPVarInt(playerid, "ReadSystemWarning", 1);
  4319.             SendWarningMessage(playerid, COLOR_GRAD2, "Você passou a ler os avisos do sistema.");
  4320.             format(_string, 128, "%s (%d) ativou a leitura dos avisos do sistema.", ReturnPlayerNameEx(playerid), playerid);
  4321.             AdminWarning(COLOR_YELLOW, _string);
  4322.         }
  4323.     }
  4324.     return 1;
  4325. }
  4326.  
  4327. CMD:ver(playerid, params[])
  4328. {
  4329.     format(_largestring, 1280, "%s - /ver %s", ReturnFullName(playerid), params);
  4330.     CommandLog(_largestring);
  4331.     new otherplayerid;
  4332.     if (sscanf(params, "u", otherplayerid))
  4333.     {
  4334.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("ver", playerid));
  4335.         return SendCommandMessage(playerid, -1, _string);
  4336.     }
  4337.     if(IsPlayerInRangeOfPlayer(playerid, otherplayerid, 5))
  4338.     {
  4339.         SetPVarInt(playerid, "PlayerSeen", otherplayerid);
  4340.         ShowPlayerDialog(playerid, DIALOG_PLAYERDESCRIPTION, DIALOG_STYLE_LIST, "Informações", "Altura\nPeso\nTatuagens\nCor do Cabelo\nCor de Pele\nBarba\nOutras descrições\nCor dos Olhos\nDefinição Corporal", "Ok", "Sair");
  4341.         return 1;
  4342.     }
  4343.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4344. }
  4345.  
  4346. CMD:ame(playerid, params[])
  4347. {
  4348.     format(_largestring, 1280, "%s - /ame %s", ReturnFullName(playerid), params);
  4349.     CommandLog(_largestring);
  4350.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4351.     new text[128];
  4352.     if (sscanf(params, "s[128]", text))
  4353.     {
  4354.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("ame", playerid));
  4355.         return SendCommandMessage(playerid, -1, _string);
  4356.     }
  4357.     format(_string, sizeof(_string), "* %s %s", ReturnPlayerNameEx(playerid), text);
  4358.     SendClientMessage(playerid, COLOR_PURPLE, _string);
  4359.     new stringfull[192];
  4360.     new lengths[96];
  4361.     new length2[96];
  4362.     strmid(stringfull, _string, 0, 192);
  4363.     strmid(lengths, stringfull, 0, 96);
  4364.     strmid(length2, _string, 95, 192);
  4365.     if(strlen(_string) > 96)
  4366.     {
  4367.         new message[192];
  4368.         format(message, 192, "%s...\n...%s", lengths,length2);
  4369.         SetPlayerChatBubble(playerid, _string, COLOR_PURPLE, 15, 15000);
  4370.     }
  4371.     else
  4372.     {
  4373.         SetPlayerChatBubble(playerid, _string, COLOR_PURPLE, 15, 15000);
  4374.     }
  4375.     SendActionMessage(playerid, COLOR_OOC, _string);
  4376.     return 1;
  4377. }
  4378.  
  4379. CMD:me(playerid, params[])
  4380. {
  4381.     format(_largestring, 1280, "%s - /me %s", ReturnFullName(playerid), params);
  4382.     CommandLog(_largestring);
  4383.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4384.     new text[128];
  4385.     if (sscanf(params, "s[128]", text))
  4386.     {
  4387.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("me", playerid));
  4388.         return SendCommandMessage(playerid, -1, _string);
  4389.     }
  4390.     format(_string, sizeof(_string), "* %s %s", ReturnPlayerNameEx(playerid), text);
  4391.     nearByMessage(playerid, COLOR_PURPLE, _string, 15);
  4392.     return 1;
  4393. }
  4394.  
  4395. CMD:do(playerid, params[])
  4396. {
  4397.     format(_largestring, 1280, "%s - /do %s", ReturnFullName(playerid), params);
  4398.     CommandLog(_largestring);
  4399.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4400.     new text[128];
  4401.     if (sscanf(params, "s[128]", text))
  4402.     {
  4403.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("do", playerid));
  4404.         return SendCommandMessage(playerid, -1, _string);
  4405.     }
  4406.     format(_string, sizeof(_string), "* %s (%s)", text, ReturnPlayerNameEx(playerid));
  4407.     nearByMessage(playerid, COLOR_PURPLE, _string, 15);
  4408.     return 1;
  4409. }
  4410.  
  4411. CMD:l(playerid, params[])
  4412.     return cmd_falar(playerid, params);
  4413.  
  4414. CMD:falar(playerid, params[])
  4415. {
  4416.     format(_largestring, 1280, "%s - /falar %s", ReturnFullName(playerid), params);
  4417.     CommandLog(_largestring);
  4418.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4419.     new text[128];
  4420.     if (sscanf(params, "s[128]", text))
  4421.     {
  4422.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("falar", playerid));
  4423.         return SendCommandMessage(playerid, -1, _string);
  4424.     }
  4425.     if(GetPVarInt(playerid, "SotaqueOn"))
  4426.     {
  4427.         format(_string, 128, "%s [Sotaque %s] diz: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4428.         nearByMessage(playerid, COLOR_FADE1, _string, 10.0);
  4429.     }
  4430.     else
  4431.     {
  4432.         format(_string, 128, "%s diz: %s", ReturnPlayerNameEx(playerid), text);
  4433.         nearByMessage(playerid, COLOR_FADE1, _string, 10.0);
  4434.     }
  4435.     return 1;
  4436. }
  4437.  
  4438. CMD:b(playerid, params[])
  4439. {
  4440.     format(_largestring, 1280, "%s - /b %s", ReturnFullName(playerid), params);
  4441.     CommandLog(_largestring);
  4442.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4443.     new result[128];
  4444.     if (sscanf(params, "s[128]", result))
  4445.     {
  4446.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("b", playerid));
  4447.         return SendCommandMessage(playerid, -1, _string);
  4448.     }
  4449.     if(GetPVarInt(playerid, "AdminDuty"))
  4450.     {
  4451.         format(_largestring, 200, "(( Admin %s [%d]: %s ))", ReturnPlayerNameEx(playerid), playerid, result);
  4452.         nearByMessage(playerid, COLOR_YELLOW, _string, 20.0);
  4453.     }
  4454.     else
  4455.     {
  4456.         format(_largestring, 200, "(( %s [%d]: %s ))", ReturnPlayerNameEx(playerid), playerid, result);
  4457.         nearByMessage(playerid, COLOR_GREY, _string, 20.0);
  4458.     }
  4459.     return 1;
  4460. }
  4461.  
  4462. CMD:ba(playerid, params[])
  4463.     return cmd_baixo(playerid, params);
  4464.  
  4465. CMD:baixo(playerid, params[])
  4466. {
  4467.     format(_largestring, 1280, "%s - /baixo %s", ReturnFullName(playerid), params);
  4468.     CommandLog(_largestring);
  4469.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4470.     new text[128];
  4471.     if (sscanf(params, "s[128]", text))
  4472.     {
  4473.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("baixo", playerid));
  4474.         return SendCommandMessage(playerid, -1, _string);
  4475.     }
  4476.     if(GetPVarInt(playerid, "SotaqueOn"))
  4477.     {
  4478.         format(_largestring, 200, "%s [Sotaque %s] diz, em tom baixo: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4479.         nearByMessage(playerid, COLOR_FADE1, _largestring, 5.0);
  4480.     }
  4481.     else
  4482.     {
  4483.         format(_largestring, 200, "%s diz, em tom baixo: %s", ReturnPlayerNameEx(playerid), text);
  4484.         nearByMessage(playerid, COLOR_FADE1, _largestring, 5.0);
  4485.     }
  4486.     return 1;
  4487. }
  4488.  
  4489. CMD:g(playerid, params[])
  4490.     return cmd_gritar(playerid, params);
  4491.  
  4492. CMD:gritar(playerid, params[])
  4493. {
  4494.     format(_largestring, 1280, "%s - /gritar %s", ReturnFullName(playerid), params);
  4495.     CommandLog(_largestring);
  4496.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4497.     new text[128];
  4498.     if (sscanf(params, "s[128]", text))
  4499.     {
  4500.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("gritar", playerid));
  4501.         return SendCommandMessage(playerid, -1, _string);
  4502.     }
  4503.     if(GetPVarInt(playerid, "SotaqueOn"))
  4504.     {
  4505.         format(_largestring, 200, "%s [Sotaque %s] grita: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4506.         nearByMessage(playerid, COLOR_FADE1, _largestring, 20.0);
  4507.     }
  4508.     else
  4509.     {
  4510.         format(_largestring, 200, "%s grita: %s", ReturnPlayerNameEx(playerid), text);
  4511.         nearByMessage(playerid, COLOR_FADE1, _largestring, 20.0);
  4512.     }
  4513.     return 1;
  4514. }
  4515.  
  4516. CMD:frequencia(playerid, params[])
  4517.     return cmd_freq(playerid, params);
  4518.  
  4519. CMD:canal(playerid, params[])
  4520.     return cmd_freq(playerid, params);
  4521.  
  4522. CMD:freq(playerid, params[])
  4523. {
  4524.     format(_largestring, 1280, "%s - /freq %s", ReturnFullName(playerid), params);
  4525.     CommandLog(_largestring);
  4526.     new hz;
  4527.     if (sscanf(params, "d", hz) || hz < 1 || hz > 10)
  4528.     {
  4529.         format(_string, sizeof (_string), "\"/%s [canal]\"", Command_GetDisplayNamed("freq", playerid));
  4530.         return SendCommandMessage(playerid, -1, _string);
  4531.     }
  4532.     PlayerInfo[playerid][pRadioFreq] = hz;
  4533.     format(_string, 128, "Você colocou o seu rádio no canal #%d", hz);
  4534.     SendActionMessage(playerid, -1, _string);
  4535.     format(_string, 128, "* %s recolhe seu rádio de mão, e seleciona um canal no mesmo. ", ReturnPlayerNameEx(playerid));
  4536.     nearByMessage(playerid, -1, _string);
  4537.     return 1;
  4538. }
  4539.  
  4540. CMD:walkie(playerid, params[])
  4541.     return cmd_wt(playerid, params);
  4542.  
  4543. CMD:wt(playerid, params[])
  4544. {
  4545.     format(_largestring, 1280, "%s - /wt %s", ReturnFullName(playerid), params);
  4546.     CommandLog(_largestring);
  4547.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4548.     new text[128];
  4549.     if (sscanf(params, "s[128]", text))
  4550.     {
  4551.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("freq", playerid));
  4552.         return SendCommandMessage(playerid, -1, _string);
  4553.     }
  4554.     if(GetPVarInt(playerid, "SotaqueOn"))
  4555.     {
  4556.         format(_largestring, 200, "** %s [Sotaque %s]: %s **", PlayerInfo[playerid][pRadioAlias], PlayerInfo[playerid][pSotaque], text);
  4557.         SendWalkieMessage(PlayerInfo[playerid][pRadioFreq], 0x8D8DFFFF, _largestring);
  4558.     }
  4559.     else
  4560.     {
  4561.         format(_largestring, 200, "** %s: %s **", PlayerInfo[playerid][pRadioAlias], text);
  4562.         SendWalkieMessage(PlayerInfo[playerid][pRadioFreq], 0x8D8DFFFF, _largestring);
  4563.     }
  4564.     if(PlayerInfo[playerid][pRadioFreq] > 1 || PlayerInfo[playerid][pRadioFreq] < 10)
  4565.     {
  4566.         if(GetPVarInt(playerid, "SotaqueOn"))
  4567.         {
  4568.             format(_largestring, 200, "%s [Sotaque %s] diz, no rádio: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4569.             nearByMessage(playerid, COLOR_FADE1, _largestring, 10.0);
  4570.         }
  4571.         else
  4572.         {
  4573.             format(_largestring, 200, "%s diz, no rádio: %s", ReturnPlayerNameEx(playerid), text);
  4574.             nearByMessage(playerid, COLOR_FADE1, _largestring, 10.0);
  4575.         }
  4576.     }
  4577.     else return SendErrorMessage(playerid, -1, "Você não selecionou uma frequência para falar.");
  4578.     return 1;
  4579. }
  4580.  
  4581. CMD:r(playerid, params[])
  4582.     return cmd_radio(playerid, params);
  4583.  
  4584. CMD:radio(playerid, params[])
  4585. {
  4586.     format(_largestring, 1280, "%s - /radio %s", ReturnFullName(playerid), params);
  4587.     CommandLog(_largestring);
  4588.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4589.     new text[128];
  4590.     if (sscanf(params, "s[128]", text))
  4591.     {
  4592.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("radio", playerid));
  4593.         return SendCommandMessage(playerid, -1, _string);
  4594.     }
  4595.     if(PlayerInfo[playerid][pFaction] > 0)
  4596.     {
  4597.         if(GetPVarInt(playerid, "SotaqueOn"))
  4598.         {
  4599.         format(_largestring, 200, "%s [Sotaque %s] diz, no rádio: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4600.         nearByMessage(playerid, COLOR_FADE1, _largestring, 10.0);
  4601.         }
  4602.         else
  4603.         {
  4604.             format(_largestring, 200, "%s diz, no rádio: %s", ReturnPlayerNameEx(playerid), text);
  4605.             nearByMessage(playerid, COLOR_FADE1, _largestring, 10.0);
  4606.         }
  4607.     }
  4608.     else return SendErrorMessage(playerid, -1, "Você não tem um rádio desse tipo.");
  4609.     if(GetPVarInt(playerid, "SotaqueOn"))
  4610.     {
  4611.         format(_largestring, 200, "** %s [Sotaque %s]: %s **", PlayerInfo[playerid][pOfficialAlias], PlayerInfo[playerid][pSotaque], text);
  4612.         SendRadioMessage(PlayerInfo[playerid][pFaction], 0x8D8DFFFF, _largestring);
  4613.     }
  4614.     else
  4615.     {
  4616.         format(_largestring, 200, "** %s %s **", PlayerInfo[playerid][pOfficialAlias], text);
  4617.         SendRadioMessage(PlayerInfo[playerid][pFaction], 0x8D8DFFFF, _largestring);
  4618.     }
  4619.     return 1;
  4620. }
  4621.  
  4622. CMD:mp(playerid, params[])
  4623.     return cmd_pm(playerid, params);
  4624.  
  4625. CMD:pm(playerid, params[])
  4626. {
  4627.     format(_largestring, 1280, "%s - /pm %s", ReturnFullName(playerid), params);
  4628.     CommandLog(_largestring);
  4629.     new text[128], otherplayerid;
  4630.     if (sscanf(params, "us[128]", otherplayerid, text))
  4631.     {
  4632.         format(_string, sizeof (_string), "\"/%s [id/nome] [texto]\"", Command_GetDisplayNamed("pm", playerid));
  4633.         return SendCommandMessage(playerid, -1, _string);
  4634.     }
  4635.     if(GetPVarInt(playerid, "PM") && GetPVarInt(otherplayerid, "PM"))
  4636.     {
  4637.         foreach(Player, i)
  4638.         {
  4639.             if(GetPVarInt(i, "LerPM"))
  4640.             {
  4641.                 format(_string, 128, "MP de \"%s\" (%d) para \"%s\" (%d)", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  4642.                 SendClientMessage(i, COLOR_YELLOW, _string);
  4643.                 format(_string, 128, "\"%s\"", text);
  4644.                 SendClientMessage(i, COLOR_YELLOW, _string);
  4645.                 return 1;
  4646.             }
  4647.         }
  4648.         new stringfull[128];
  4649.         new lengths[128];
  4650.         new length2[128];
  4651.         strmid(stringfull, text, 0, 128);
  4652.         strmid(lengths, stringfull, 0, 73);
  4653.         strmid(length2, text, 72, 128);
  4654.         if(strlen(text) > 72)
  4655.         {
  4656.             format(_string, 128, "MP de \"%s\" (%d): \"%s ...", ReturnPlayerNameEx(playerid), playerid, lengths);
  4657.             SendClientMessage(otherplayerid, COLOR_YELLOW, _string);
  4658.             format(_string, 128, "... %s\"", length2);
  4659.             SendClientMessage(otherplayerid, COLOR_YELLOW, _string);
  4660.             format(_string, 128, "MP enviada para \"%s\" (%d): \"%s ...", ReturnPlayerNameEx(otherplayerid), otherplayerid, lengths);
  4661.             SendClientMessage(playerid, COLOR_YELLOW, _string);
  4662.             format(_string, 128, "... %s\"", length2);
  4663.             SendClientMessage(playerid, COLOR_YELLOW, _string);
  4664.             return 1;
  4665.         }
  4666.         else
  4667.         {
  4668.             format(text, 128, "MP de \"%s\" (%d): \"%s\"", ReturnPlayerNameEx(playerid), playerid, text);
  4669.             SendClientMessage(otherplayerid, COLOR_YELLOW, _string);
  4670.             format(_string, 128, "MP enviada para \"%s\" (%d): \"%s", ReturnPlayerNameEx(otherplayerid), otherplayerid, lengths);
  4671.             SendClientMessage(playerid, COLOR_YELLOW, _string);
  4672.             return 1;
  4673.         }
  4674.     }
  4675.     else SendErrorMessage(playerid, -1, "Você ou a pessoa a qual você quer mandar uma PM não estão com as PM's ativadas!");
  4676.     return 1;
  4677. }
  4678.  
  4679. CMD:s(playerid, params[])
  4680.     return cmd_sussurrar(playerid, params);
  4681.  
  4682. CMD:sussurrar(playerid, params[])
  4683. {
  4684.     format(_largestring, 1280, "%s - /sussurrar %s", ReturnFullName(playerid), params);
  4685.     CommandLog(_largestring);
  4686.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  4687.     new text[128];
  4688.     if (sscanf(params, "s[128]", text))
  4689.     {
  4690.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("sussurrar", playerid));
  4691.         return SendCommandMessage(playerid, -1, _string);
  4692.     }
  4693.     if(GetPVarInt(playerid, "SotaqueOn"))
  4694.     {
  4695.         format(_largestring, 200, "%s [Sotaque %s] diz, sussurrando: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4696.         nearByMessage(playerid, COLOR_FADE1, _largestring, 2.5);
  4697.     }
  4698.     else
  4699.     {
  4700.         format(_largestring, 200, "%s diz, sussurrando: %s", ReturnPlayerNameEx(playerid), text);
  4701.         nearByMessage(playerid, COLOR_FADE1, _largestring, 2.5);
  4702.     }
  4703.     return 1;
  4704. }
  4705.  
  4706. CMD:cs(playerid, params[])
  4707.     return cmd_carrosussurrar(playerid, params);
  4708.  
  4709. CMD:cw(playerid, params[])
  4710.     return cmd_carrosussurrar(playerid, params);
  4711.  
  4712. CMD:carrosussurrar(playerid, params[])
  4713. {
  4714.     format(_largestring, 1280, "%s - /carrosussurrar %s", ReturnFullName(playerid), params);
  4715.     CommandLog(_largestring);
  4716.     new text[128];
  4717.     if (sscanf(params, "s[128]", text))
  4718.     {
  4719.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("sussurrar", playerid));
  4720.         return SendCommandMessage(playerid, -1, _string);
  4721.     }
  4722.     foreach(Player, i)
  4723.     {
  4724.         if(IsPlayerInAnyVehicle(playerid)) return SendErrorMessage(playerid, -1, "Você não pode usar isso fora de um carro.");
  4725.         if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
  4726.         {
  4727.             if(GetPVarInt(playerid, "SotaqueOn"))
  4728.             {
  4729.                 new stringfull[128];
  4730.                 new lengths[128];
  4731.                 new length2[128];
  4732.                 strmid(stringfull, text, 0, 128);
  4733.                 strmid(lengths, stringfull, 0, 45);
  4734.                 strmid(length2, text, 44, 128);
  4735.                 if(strlen(text) > 44)
  4736.                 {
  4737.                     format(_string, 128, "%s [Sotaque %s] diz, sussurrando: %s ...", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], lengths);
  4738.                     SendClientMessage(i, -1, _string);
  4739.                     format(_string, 128, "... %s", length2);
  4740.                     SendClientMessage(i, -1, _string);
  4741.                     return 1;
  4742.                 }
  4743.                 else
  4744.                 {
  4745.                     format(_string, 128, "%s [Sotaque %s] diz, sussurrando: %s", ReturnPlayerNameEx(playerid), PlayerInfo[playerid][pSotaque], text);
  4746.                     SendClientMessage(i, -1, _string);
  4747.                     return 1;
  4748.                 }
  4749.             }
  4750.             else
  4751.             {
  4752.                 new stringfull[128];
  4753.                 new lengths[128];
  4754.                 new length2[128];
  4755.                 strmid(stringfull, text, 0, 128);
  4756.                 strmid(lengths, stringfull, 0, 79);
  4757.                 strmid(length2, text, 78, 192);
  4758.                 if(strlen(text) > 78)
  4759.                 {
  4760.                     format(_string, 128, "%s diz, sussurrando: %s ...", ReturnPlayerNameEx(playerid), lengths);
  4761.                     SendClientMessage(i, -1, _string);
  4762.                     format(_string, 128, "... %s", length2);
  4763.                     SendClientMessage(i, -1, _string);
  4764.                     return 1;
  4765.                 }
  4766.                 else
  4767.                 {
  4768.                     format(_string, 128, "%s diz, sussurrando: %s", ReturnPlayerNameEx(playerid), text);
  4769.                     SendClientMessage(i, -1, _string);
  4770.                     return 1;
  4771.                 }
  4772.             }
  4773.         }
  4774.     }
  4775.     return 1;
  4776. }
  4777.  
  4778. CMD:a(playerid, params[])
  4779.     return cmd_admin(playerid, params);
  4780.  
  4781. CMD:admin(playerid, params[])
  4782. {
  4783.     format(_largestring, 1280, "%s - /a %s", ReturnFullName(playerid), params);
  4784.     CommandLog(_largestring);
  4785.     new text[128];
  4786.     if (sscanf(params, "s[128]", text))
  4787.     {
  4788.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("admin", playerid));
  4789.         return SendCommandMessage(playerid, -1, _string);
  4790.     }
  4791.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4792.     {
  4793.         format(_string, sizeof(_string), "** %s [%d]: %s **", ReturnPlayerNameEx(playerid), playerid, text);
  4794.         AdminChat(COLOR_OOC, _string);
  4795.         return 1;
  4796.     }
  4797.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4798. }
  4799.  
  4800. CMD:setarhoras(playerid, params[])
  4801.     return cmd_tod(playerid, params);
  4802.  
  4803. CMD:tod(playerid, params[])
  4804. {
  4805.     format(_largestring, 1280, "%s - /tod %s", ReturnFullName(playerid), params);
  4806.     CommandLog(_largestring);
  4807.     new hour;
  4808.     if (sscanf(params, "d", hour) || hour < 0 || hour > 24)
  4809.     {
  4810.         format(_string, sizeof (_string), "\"/%s [horas]\"", Command_GetDisplayNamed("tod", playerid));
  4811.         return SendCommandMessage(playerid, -1, _string);
  4812.     }
  4813.     if(PlayerInfo[playerid][pAdmin] >= 3)
  4814.     {
  4815.         SetWorldTime(hour);
  4816.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s acaba de mudar as horas para {0064FF}%d{AFAFAF}!", ReturnPlayerNameEx(playerid), hour);
  4817.         OOCMessage(COLOR_OOC, _string);
  4818.         return 1;
  4819.     }
  4820.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4821. }
  4822.  
  4823. CMD:daradmin(playerid, params[])
  4824. {
  4825.     format(_largestring, 1280, "%s - /daradmin %s", ReturnFullName(playerid), params);
  4826.     CommandLog(_largestring);
  4827.     new level, otherplayerid;
  4828.     if (sscanf(params, "ud", otherplayerid, level) || level < 0)
  4829.     {
  4830.         format(_string, sizeof (_string), "\"/%s [nome/id] [nível]\"", Command_GetDisplayNamed("daradmin", playerid));
  4831.         return SendCommandMessage(playerid, -1, _string);
  4832.     }
  4833.     if(PlayerInfo[playerid][pAdmin] >= 1337)
  4834.     {
  4835.         PlayerInfo[otherplayerid][pAdmin] = level;
  4836.         format(_string, 128, "%s (%d) deu a %s (%d) o nível %d de administração.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid, level);
  4837.         AdminWarning(COLOR_YELLOW, _string);
  4838.         format(_string, 128, "%s (%d) lhe deu o nível %d de administração.", ReturnPlayerNameEx(playerid), playerid, level);
  4839.         SendWarningMessage(otherplayerid, -1, _string);
  4840.         return 1;
  4841.     }
  4842.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4843. }
  4844.  
  4845. CMD:darlider(playerid, params[])
  4846. {
  4847.     format(_largestring, 1280, "%s - /darlider %s", ReturnFullName(playerid), params);
  4848.     CommandLog(_largestring);
  4849.     new otherplayerid, faction;
  4850.     if (sscanf(params, "ud", otherplayerid, faction) || faction < 0 || faction > MAX_FACTIONS)
  4851.     {
  4852.         format(_string, sizeof (_string), "\"/%s [nome/id] [nível]\"", Command_GetDisplayNamed("darlider", playerid));
  4853.         return SendCommandMessage(playerid, -1, _string);
  4854.     }
  4855.     if(PlayerInfo[playerid][pAdmin] >= 1337)
  4856.     {
  4857.         PlayerInfo[otherplayerid][pFaction] = faction;
  4858.         PlayerInfo[otherplayerid][pRank] = 10;
  4859.         format(_string, 128, "%s (%d) deu a %s (%d) a liderança da facção %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid, FactionInfo[faction][fName], faction);
  4860.         AdminWarning(COLOR_YELLOW, _string);
  4861.         format(_string, 128, "%s (%d) lhe deu a liderança da facção %s (%d).", ReturnPlayerNameEx(playerid), playerid, FactionInfo[faction][fName], faction);
  4862.         SendWarningMessage(otherplayerid, -1, _string);
  4863.         return 1;
  4864.     }
  4865.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4866. }
  4867.  
  4868. CMD:irlv(playerid, params[])
  4869. {
  4870.     format(_largestring, 1280, "%s - /irlv %s", ReturnFullName(playerid), params);
  4871.     CommandLog(_largestring);
  4872.     new otherplayerid;
  4873.     if (sscanf(params, "u", otherplayerid))
  4874.     {
  4875.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("irlv", playerid));
  4876.         return SendCommandMessage(playerid, -1, _string);
  4877.     }
  4878.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4879.     {
  4880.         if (GetPlayerState(playerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid), 1699.2, 1435.1, 10.7);
  4881.         else SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
  4882.         if(otherplayerid == playerid) format(_string, 128, "%s (%d) foi até Las Venturas.", ReturnPlayerNameEx(playerid), playerid);
  4883.         else format(_string, 128, "%s (%d) levou %s (%d) até Las Venturas.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  4884.         AdminWarning(COLOR_YELLOW, _string);
  4885.         format(_string, 128, "%s (%d) lhe mandou para Las Venturas.", ReturnPlayerNameEx(playerid), playerid);
  4886.         SendWarningMessage(otherplayerid, -1, _string);
  4887.         return 1;
  4888.     }
  4889.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4890. }
  4891.  
  4892. CMD:ir(playerid, params[])
  4893. {
  4894.     format(_largestring, 1280, "%s - /ir %s", ReturnFullName(playerid), params);
  4895.     CommandLog(_largestring);
  4896.     new otherplayerid, Float:plocx, Float:plocy, Float:plocz;
  4897.     if (sscanf(params, "u", otherplayerid))
  4898.     {
  4899.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("ir", playerid));
  4900.         return SendCommandMessage(playerid, -1, _string);
  4901.     }
  4902.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4903.     {
  4904.         GetPlayerPos(otherplayerid, plocx, plocy, plocz);
  4905.         if(PlayerInfo[otherplayerid][pInt] > 0)
  4906.         {
  4907.             SetPlayerInterior(playerid,PlayerInfo[otherplayerid][pInt]);
  4908.             SetPlayerVirtualWorld(playerid,PlayerInfo[otherplayerid][pVirWorld]);
  4909.             PlayerInfo[playerid][pVirWorld] = PlayerInfo[otherplayerid][pVirWorld];
  4910.         }
  4911.         if (GetPlayerState(otherplayerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid), plocx, plocy+4, plocz);
  4912.         else SetPlayerPos(playerid,plocx,plocy+2, plocz);
  4913.         format(_string, 128, "%s (%d) foi/se teletransportou até %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  4914.         AdminWarning(COLOR_YELLOW, _string);
  4915.         format(_string, 128, "%s (%d) se teletransportou até você.", ReturnPlayerNameEx(playerid), playerid);
  4916.         SendWarningMessage(otherplayerid, -1, _string);
  4917.         return 1;
  4918.     }
  4919.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4920. }
  4921.  
  4922. CMD:puxar(playerid, params[])
  4923.     return cmd_trazer(playerid, params);
  4924.  
  4925. CMD:trazer(playerid, params[])
  4926. {
  4927.     format(_largestring, 1280, "%s - /trazer %s", ReturnFullName(playerid), params);
  4928.     CommandLog(_largestring);
  4929.     new otherplayerid, Float:plocx, Float:plocy, Float:plocz;
  4930.     if (sscanf(params, "u", otherplayerid))
  4931.     {
  4932.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("trazer", playerid));
  4933.         return SendCommandMessage(playerid, -1, _string);
  4934.     }
  4935.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4936.     {
  4937.         GetPlayerPos(playerid, plocx, plocy, plocz);
  4938.         if(PlayerInfo[playerid][pInt] > 0)
  4939.         {
  4940.             SetPlayerInterior(otherplayerid,PlayerInfo[playerid][pInt]);
  4941.             SetPlayerVirtualWorld(otherplayerid,PlayerInfo[playerid][pVirWorld]);
  4942.             PlayerInfo[otherplayerid][pVirWorld] = PlayerInfo[playerid][pVirWorld];
  4943.         }
  4944.         if (GetPlayerState(otherplayerid) == 2) SetVehiclePos(GetPlayerVehicleID(otherplayerid), plocx, plocy+4, plocz);
  4945.         else SetPlayerPos(playerid,plocx,plocy+2, plocz);
  4946.         format(_string, 128, "%s (%d) puxou/trouxe %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  4947.         AdminWarning(COLOR_YELLOW, _string);
  4948.         format(_string, 128, "%s (%d) lhe trouxe/puxou.", ReturnPlayerNameEx(playerid), playerid);
  4949.         SendWarningMessage(otherplayerid, -1, _string);
  4950.         return 1;
  4951.     }
  4952.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4953. }
  4954.  
  4955. CMD:ircarro(playerid, params[])
  4956.     return cmd_irveiculo(playerid, params);
  4957.  
  4958. CMD:irc(playerid, params[])
  4959.     return cmd_irveiculo(playerid, params);
  4960.  
  4961. CMD:irv(playerid, params[])
  4962.     return cmd_irveiculo(playerid, params);
  4963.  
  4964. CMD:irveiculo(playerid, params[])
  4965. {
  4966.     format(_largestring, 1280, "%s - /irveiculo %s", ReturnFullName(playerid), params);
  4967.     CommandLog(_largestring);
  4968.     new vehicleid, Float:vlocx, Float:vlocy, Float:vlocz;
  4969.     if (sscanf(params, "i", vehicleid))
  4970.     {
  4971.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("irveiculo", playerid));
  4972.         return SendCommandMessage(playerid, -1, _string);
  4973.     }
  4974.     if(PlayerInfo[playerid][pAdmin] >= 1)
  4975.     {
  4976.         if(CarInfo[vehicleid][cModel] < 400) return SendErrorMessage(playerid, -1, "Este veículo não existe!");
  4977.         GetVehiclePos(vehicleid, vlocx, vlocy, vlocz);
  4978.         if(CarInfo[vehicleid][cInt] > 0)
  4979.         {
  4980.             if (GetPlayerState(playerid) == 2)
  4981.             {
  4982.                 SetVehiclePos(GetPlayerVehicleID(playerid), vlocx, vlocy+4, vlocz);
  4983.                 LinkVehicleToInterior(GetPlayerVehicleID(playerid), CarInfo[vehicleid][cInt]);
  4984.                 SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), CarInfo[vehicleid][cVW]);
  4985.             }
  4986.             SetPlayerInterior(playerid,CarInfo[vehicleid][cInt]);
  4987.             SetPlayerVirtualWorld(playerid,CarInfo[vehicleid][cVW]);
  4988.             PlayerInfo[playerid][pVirWorld] = CarInfo[vehicleid][cVW];
  4989.         }
  4990.         SetPlayerPos(playerid,vlocx,vlocy+2, vlocz);
  4991.         format(_string, 128, "%s (%d) foi até um/uma %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid);
  4992.         AdminWarning(COLOR_YELLOW, _string);
  4993.         return 1;
  4994.     }
  4995.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  4996. }
  4997.  
  4998. CMD:puxarveiculo(playerid, params[])
  4999.     return cmd_puxarcarro(playerid, params);
  5000.  
  5001. CMD:pv(playerid, params[])
  5002.     return cmd_puxarcarro(playerid, params);
  5003.  
  5004. CMD:puxarcarro(playerid, params[])
  5005. {
  5006.     format(_largestring, 1280, "%s - /trazerveiculo %s", ReturnFullName(playerid), params);
  5007.     CommandLog(_largestring);
  5008.     new vehicleid, Float:vlocx, Float:vlocy, Float:vlocz;
  5009.     if (sscanf(params, "i", vehicleid))
  5010.     {
  5011.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("trazerveiculo", playerid));
  5012.         return SendCommandMessage(playerid, -1, _string);
  5013.     }
  5014.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5015.     {
  5016.         if(CarInfo[vehicleid][cModel] < 400) return SendErrorMessage(playerid, -1, "Este veículo não existe!");
  5017.         GetPlayerPos(vehicleid, vlocx, vlocy, vlocz);
  5018.         if(PlayerInfo[playerid][pInt] > 0)
  5019.         {
  5020.             SetVehiclePos(vehicleid, vlocx, vlocy+4, vlocz);
  5021.             CarInfo[vehicleid][cInt] = PlayerInfo[playerid][pInt];
  5022.             LinkVehicleToInterior(vehicleid, CarInfo[vehicleid][cInt]);
  5023.             CarInfo[vehicleid][cVW] = PlayerInfo[playerid][pVirWorld];
  5024.             SetVehicleVirtualWorld(vehicleid, CarInfo[vehicleid][cVW]);
  5025.             foreach(Player, i)
  5026.             {
  5027.                 if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == vehicleid)
  5028.                 {
  5029.                     SetPlayerInterior(playerid,CarInfo[vehicleid][cInt]);
  5030.                     SetPlayerVirtualWorld(playerid,CarInfo[vehicleid][cVW]);
  5031.                     PlayerInfo[playerid][pVirWorld] = CarInfo[vehicleid][cVW];
  5032.                 }
  5033.             }
  5034.         }
  5035.         format(_string, 128, "%s (%d) trouxe/puxou um/uma %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid);
  5036.         AdminWarning(COLOR_YELLOW, _string);
  5037.         return 1;
  5038.     }
  5039.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5040. }
  5041.  
  5042.  
  5043. CMD:lastcar(playerid, params[])
  5044.     return cmd_veiculoanterior(playerid, params);
  5045.  
  5046. CMD:oldcar(playerid, params[])
  5047.     return cmd_veiculoanterior(playerid, params);
  5048.  
  5049. CMD:oldveh(playerid, params[])
  5050.     return cmd_veiculoanterior(playerid, params);
  5051.  
  5052. CMD:veiculoanterior(playerid, params[]) {
  5053.     format(_largestring, 1280, "%s - /veiculoanterior %s", ReturnFullName(playerid), params);
  5054.     CommandLog(_largestring);
  5055.     format(_string, sizeof(_string), "O último carro no qual você entrou foi um/uma %s (%d)", ReturnVehicleNameID(GetPVarInt(playerid, "LastCar")), GetPVarInt(playerid, "LastCar"));
  5056.     SendWarningMessage(playerid, -1, _string);
  5057.     return 1;
  5058. }
  5059.  
  5060. CMD:dararma(playerid, params[])
  5061. {
  5062.     format(_largestring, 1280, "%s - /dararma %s", ReturnFullName(playerid), params);
  5063.     CommandLog(_largestring);
  5064.     new otherplayerid, weapon, ammo;
  5065.     if (sscanf(params, "udd", otherplayerid, weapon, ammo) || weapon < 0 || weapon > 46 || ammo < 0)
  5066.     {
  5067.         format(_string, sizeof (_string), "\"/%s [nome/id] [arma] [munição]\"", Command_GetDisplayNamed("dararma", playerid));
  5068.         return SendCommandMessage(playerid, -1, _string);
  5069.     }
  5070.     if(PlayerInfo[playerid][pAdmin] >= 4)
  5071.     {
  5072.         if(PlayerInfo[otherplayerid][pGun1] > 0 && PlayerInfo[otherplayerid][pGun2] > 0 && PlayerInfo[otherplayerid][pGun3] > 0) return SendErrorMessage(playerid, -1, "O jogador já tem três armas!");
  5073.         GivePlayerWeaponEx(playerid, weapon, ammo);
  5074.         format(_string, 128, "%s (%d) deu a %s (%d) uma %s (%d) com %d balas.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid, ReturnWeaponName(weapon), weapon, ammo);
  5075.         AdminWarning(COLOR_YELLOW, _string);
  5076.         format(_string, 128, "%s (%d) lhe deu uma %s (%d) com %d balas.", ReturnPlayerNameEx(playerid), playerid, ReturnWeaponName(weapon), weapon, ammo);
  5077.         SendWarningMessage(otherplayerid, -1, _string);
  5078.         return 1;
  5079.     }
  5080.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5081. }
  5082.  
  5083. CMD:darvida(playerid, params[])
  5084. {
  5085.     format(_largestring, 1280, "%s - /darvida %s", ReturnFullName(playerid), params);
  5086.     CommandLog(_largestring);
  5087.     new otherplayerid, Float:vida, Float:oldvida;
  5088.     if (sscanf(params, "uf", otherplayerid, vida))
  5089.     {
  5090.         format(_string, sizeof (_string), "\"/%s [nome/id] [quantidade]\"", Command_GetDisplayNamed("darvida", playerid));
  5091.         return SendCommandMessage(playerid, -1, _string);
  5092.     }
  5093.     if(PlayerInfo[playerid][pAdmin] >= 4)
  5094.     {
  5095.         GetPlayerHealth(otherplayerid, oldvida);
  5096.         SetPlayerHealth(otherplayerid, oldvida+vida);
  5097.         format(_string, 128, "%s (%d) deu a %s (%d) %.00f de vida. Total: %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid, vida, oldvida+vida);
  5098.         AdminWarning(COLOR_YELLOW, _string);
  5099.         format(_string, 128, "%s (%d) lhe deu %.00f de vida. Sua vida total: %.00f.", ReturnPlayerNameEx(playerid), playerid, vida, oldvida+vida);
  5100.         SendWarningMessage(otherplayerid, -1, _string);
  5101.         return 1;
  5102.     }
  5103.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5104. }
  5105.  
  5106. CMD:setarvida(playerid, params[])
  5107. {
  5108.     format(_largestring, 1280, "%s - /setarvida %s", ReturnFullName(playerid), params);
  5109.     CommandLog(_largestring);
  5110.     new otherplayerid, Float:vida;
  5111.     if (sscanf(params, "uf", otherplayerid, vida) || vida < 0)
  5112.     {
  5113.         format(_string, sizeof (_string), "\"/%s [nome/id] [quantidade]\"", Command_GetDisplayNamed("setarvida", playerid));
  5114.         return SendCommandMessage(playerid, -1, _string);
  5115.     }
  5116.     if(PlayerInfo[playerid][pAdmin] >= 3)
  5117.     {
  5118.         SetPlayerHealth(otherplayerid, vida);
  5119.         format(_string, 128, "%s (%d) definiu/setou a %s (%d) %.00f de vida.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid, vida);
  5120.         AdminWarning(COLOR_YELLOW, _string);
  5121.         format(_string, 128, "%s (%d) definiu/setou a sua vida para %.00f.", ReturnPlayerNameEx(playerid), playerid, vida);
  5122.         SendWarningMessage(otherplayerid, -1, _string);
  5123.         return 1;
  5124.     }
  5125.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5126. }
  5127.  
  5128. CMD:enchervida(playerid, params[])
  5129. {
  5130.     format(_largestring, 1280, "%s - /enchervida %s", ReturnFullName(playerid), params);
  5131.     CommandLog(_largestring);
  5132.     new otherplayerid;
  5133.     if (sscanf(params, "u", otherplayerid))
  5134.     {
  5135.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("setarvida", playerid));
  5136.         return SendCommandMessage(playerid, -1, _string);
  5137.     }
  5138.     if(PlayerInfo[playerid][pAdmin] >= 2)
  5139.     {
  5140.         SetPlayerHealth(otherplayerid, 100);
  5141.         format(_string, 128, "%s (%d) encheu a vida de %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5142.         AdminWarning(COLOR_YELLOW, _string);
  5143.         format(_string, 128, "%s (%d) encheu sua vida.", ReturnPlayerNameEx(playerid), playerid);
  5144.         SendWarningMessage(otherplayerid, -1, _string);
  5145.         return 1;
  5146.     }
  5147.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5148. }
  5149.  
  5150. CMD:enchercolete(playerid, params[])
  5151. {
  5152.     format(_largestring, 1280, "%s - /enchercolete %s", ReturnFullName(playerid), params);
  5153.     CommandLog(_largestring);
  5154.     new otherplayerid;
  5155.     if (sscanf(params, "u", otherplayerid))
  5156.     {
  5157.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("setarvida", playerid));
  5158.         return SendCommandMessage(playerid, -1, _string);
  5159.     }
  5160.     if(PlayerInfo[playerid][pAdmin] >= 2)
  5161.     {
  5162.         SetPlayerArmour(otherplayerid, 100);
  5163.         format(_string, 128, "%s (%d) encheu o colete de %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5164.         AdminWarning(COLOR_YELLOW, _string);
  5165.         format(_string, 128, "%s (%d) encheu o seu colete.", ReturnPlayerNameEx(playerid), playerid);
  5166.         SendWarningMessage(otherplayerid, -1, _string);
  5167.         return 1;
  5168.     }
  5169.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5170. }
  5171.  
  5172. CMD:darcolete(playerid, params[])
  5173. {
  5174.     format(_largestring, 1280, "%s - /darcolete %s", ReturnFullName(playerid), params);
  5175.     CommandLog(_largestring);
  5176.     new otherplayerid, Float:colete, Float:oldcolete;
  5177.     if (sscanf(params, "uf", otherplayerid, colete))
  5178.     {
  5179.         format(_string, sizeof (_string), "\"/%s [nome/id] [quantidade]\"", Command_GetDisplayNamed("darcolete", playerid));
  5180.         return SendCommandMessage(playerid, -1, _string);
  5181.     }
  5182.     if(PlayerInfo[playerid][pAdmin] >= 4)
  5183.     {
  5184.         GetPlayerArmour(otherplayerid, oldcolete);
  5185.         SetPlayerArmour(otherplayerid, oldcolete+colete);
  5186.         format(_string, 128, "%s (%d) deu a %s (%d) %.00f de colete. Total: %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid, colete, oldcolete+colete);
  5187.         AdminWarning(COLOR_YELLOW, _string);
  5188.         format(_string, 128, "%s (%d) lhe deu %.00f de colete. Seu colete total: %.00f.", ReturnPlayerNameEx(playerid), playerid, colete, oldcolete+colete);
  5189.         SendWarningMessage(otherplayerid, -1, _string);
  5190.         return 1;
  5191.     }
  5192.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5193. }
  5194.  
  5195. CMD:setarcolete(playerid, params[])
  5196. {
  5197.     format(_largestring, 1280, "%s - /setarcolete %s", ReturnFullName(playerid), params);
  5198.     CommandLog(_largestring);
  5199.     new otherplayerid, Float:colete;
  5200.     if (sscanf(params, "uf", otherplayerid, colete) || colete < 0)
  5201.     {
  5202.         format(_string, sizeof (_string), "\"/%s [nome/id] [quantidade]\"", Command_GetDisplayNamed("setarcolete", playerid));
  5203.         return SendCommandMessage(playerid, -1, _string);
  5204.     }
  5205.     if(PlayerInfo[playerid][pAdmin] >= 3)
  5206.     {
  5207.         SetPlayerArmour(otherplayerid, colete);
  5208.         format(_string, 128, "%s (%d) definiu/setou a %s (%d) %.00f de colete.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5209.         AdminWarning(COLOR_YELLOW, _string);
  5210.         format(_string, 128, "%s (%d) definiu/setou o seu colete para %.00f.", ReturnPlayerNameEx(playerid), playerid, colete);
  5211.         SendWarningMessage(otherplayerid, -1, _string);
  5212.         return 1;
  5213.     }
  5214.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5215. }
  5216.  
  5217. CMD:arrumarveiculo(playerid, params[])
  5218.     return cmd_repararveiculo(playerid, params);
  5219.  
  5220. CMD:rv(playerid, params[])
  5221.     return cmd_repararveiculo(playerid, params);
  5222.  
  5223. CMD:repararveiculo(playerid, params[])
  5224. {
  5225.     format(_largestring, 1280, "%s - /repararveiculo %s", ReturnFullName(playerid), params);
  5226.     CommandLog(_largestring);
  5227.     new vehicleid;
  5228.     if (sscanf(params, "i", vehicleid))
  5229.     {
  5230.         format(_string, sizeof (_string), "\"/%s [veículo]\"", Command_GetDisplayNamed("repararveiculo", playerid));
  5231.         return SendCommandMessage(playerid, -1, _string);
  5232.     }
  5233.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5234.     {
  5235.         if(CarInfo[vehicleid][cModel] < 400) return SendErrorMessage(playerid, -1, "Este veículo não existe!");
  5236.         RepairVehicle(vehicleid);
  5237.         SetVehicleHealth(vehicleid, 1000.0);
  5238.         format(_string, 128, "%s (%d) reparou um/uma %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid);
  5239.         AdminWarning(COLOR_YELLOW, _string);
  5240.         return 1;
  5241.     }
  5242.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5243. }
  5244.  
  5245. CMD:arrumarveiculoplayer(playerid, params[])
  5246.     return cmd_repararveiculoplayer(playerid, params);
  5247.  
  5248. CMD:rvp(playerid, params[])
  5249.     return cmd_repararveiculoplayer(playerid, params);
  5250.  
  5251. CMD:repararveiculoplayer(playerid, params[])
  5252. {
  5253.     format(_largestring, 1280, "%s - /repararveiculoplayer %s", ReturnFullName(playerid), params);
  5254.     CommandLog(_largestring);
  5255.     new otherplayerid, vehicleid;
  5256.     if (sscanf(params, "u", otherplayerid))
  5257.     {
  5258.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("repararveiculo", playerid));
  5259.         return SendCommandMessage(playerid, -1, _string);
  5260.     }
  5261.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5262.     {
  5263.         if(!IsPlayerInAnyVehicle(playerid)) return SendErrorMessage(playerid, -1, "O jogador não está em um veículo!");
  5264.         vehicleid = GetPlayerVehicleID(otherplayerid);
  5265.         RepairVehicle(vehicleid);
  5266.         format(_string, 128, "%s (%d) reparou um/uma %s (%d) totalmente. Motorista: %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5267.         AdminWarning(COLOR_YELLOW, _string);
  5268.         format(_string, 128, "%s (%d) reparou seu veículo totalmente.", ReturnPlayerNameEx(playerid), playerid);
  5269.         SendWarningMessage(otherplayerid, -1, _string);
  5270.         return 1;
  5271.     }
  5272.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5273. }
  5274.  
  5275. CMD:dvc(playerid, params[])
  5276.     return cmd_darvidacarro(playerid, params);
  5277.  
  5278. CMD:darvidacarro(playerid, params[])
  5279. {
  5280.     format(_largestring, 1280, "%s - /darvidacarro %s", ReturnFullName(playerid), params);
  5281.     CommandLog(_largestring);
  5282.     new vehicleid, Float:vida, Float:oldvida;
  5283.     if (sscanf(params, "if", vehicleid, vida))
  5284.     {
  5285.         format(_string, sizeof (_string), "\"/%s [veículo] [quantidade]\"", Command_GetDisplayNamed("darvidacarro", playerid));
  5286.         return SendCommandMessage(playerid, -1, _string);
  5287.     }
  5288.     if(PlayerInfo[playerid][pAdmin] >= 3)
  5289.     {
  5290.         if(CarInfo[vehicleid][cModel] < 400) return SendErrorMessage(playerid, -1, "Este veículo não existe!");
  5291.         GetVehicleHealth(vehicleid, oldvida);
  5292.         SetVehicleHealth(vehicleid, oldvida+vida);
  5293.         format(_string, 128, "%s (%d) deu a um/uma %s (%d) %.00f de vida. Total: %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, vida, oldvida+vida);
  5294.         AdminWarning(COLOR_YELLOW, _string);
  5295.         return 1;
  5296.     }
  5297.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5298. }
  5299.  
  5300. CMD:svc(playerid, params[])
  5301.     return cmd_setarvidacarro(playerid, params);
  5302.  
  5303. CMD:setarvidacarro(playerid, params[])
  5304. {
  5305.     format(_largestring, 1280, "%s - /setarvidacarro %s", ReturnFullName(playerid), params);
  5306.     CommandLog(_largestring);
  5307.     new vehicleid, Float:vida;
  5308.     if (sscanf(params, "if", vehicleid, vida) || vida < 0)
  5309.     {
  5310.         format(_string, sizeof (_string), "\"/%s [veículo] [quantidade]\"", Command_GetDisplayNamed("setarvidacarro", playerid));
  5311.         return SendCommandMessage(playerid, -1, _string);
  5312.     }
  5313.     if(PlayerInfo[playerid][pAdmin] >= 2)
  5314.     {
  5315.         if(CarInfo[vehicleid][cModel] < 400) return SendErrorMessage(playerid, -1, "Este veículo não existe!");
  5316.         SetVehicleHealth(vehicleid, vida);
  5317.         format(_string, 128, "%s (%d) definiu/setou a vida de um/uma %s (%d) para %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, vida);
  5318.         AdminWarning(COLOR_YELLOW, _string);
  5319.         return 1;
  5320.     }
  5321.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5322. }
  5323.  
  5324. CMD:dvcp(playerid, params[])
  5325.     return cmd_darvidacarroplayer(playerid, params);
  5326.  
  5327. CMD:darvidacarroplayer(playerid, params[])
  5328. {
  5329.     format(_largestring, 1280, "%s - /darvidacarroplayer %s", ReturnFullName(playerid), params);
  5330.     CommandLog(_largestring);
  5331.     new otherplayerid, vehicleid, Float:vida, Float:oldvida;
  5332.     if (sscanf(params, "uf", otherplayerid, vida))
  5333.     {
  5334.         format(_string, sizeof (_string), "\"/%s [nome/id] [quantidade]\"", Command_GetDisplayNamed("darvidacarroplayer", playerid));
  5335.         return SendCommandMessage(playerid, -1, _string);
  5336.     }
  5337.     if(PlayerInfo[playerid][pAdmin] >= 3)
  5338.     {
  5339.         if(!IsPlayerInAnyVehicle(playerid)) return SendErrorMessage(playerid, -1, "O jogador não está em um veículo!");
  5340.         vehicleid = GetPlayerVehicleID(otherplayerid);
  5341.         GetVehicleHealth(vehicleid, oldvida);
  5342.         SetVehicleHealth(vehicleid, oldvida+vida);
  5343.         format(_string, 128, "%s (%d) deu a um/uma %s (%d), dirigida por \"%s\" (%d), %.00f de vida. Total: %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, ReturnPlayerNameEx(otherplayerid), otherplayerid, vida);
  5344.         AdminWarning(COLOR_YELLOW, _string);
  5345.         format(_string, 128, "%s (%d) deu ao seu/sua %s (%d) %.00f de vida. Total de vida de seu veículo: %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, vida, oldvida+vida);
  5346.         SendWarningMessage(otherplayerid, -1, _string);
  5347.         return 1;
  5348.     }
  5349.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5350. }
  5351.  
  5352. CMD:svcp(playerid, params[])
  5353.     return cmd_setarvidacarroplayer(playerid, params);
  5354.  
  5355. CMD:setarvidacarroplayer(playerid, params[])
  5356. {
  5357.     format(_largestring, 1280, "%s - /setarvidacarroplayer %s", ReturnFullName(playerid), params);
  5358.     CommandLog(_largestring);
  5359.     new otherplayerid, vehicleid, Float:vida;
  5360.     if (sscanf(params, "uf", otherplayerid, vehicleid) || vida < 0)
  5361.     {
  5362.         format(_string, sizeof (_string), "\"/%s [nome/id] [quantidade]\"", Command_GetDisplayNamed("setarvidacarroplayer", playerid));
  5363.         return SendCommandMessage(playerid, -1, _string);
  5364.     }
  5365.     if(PlayerInfo[playerid][pAdmin] >= 2)
  5366.     {
  5367.         if(!IsPlayerInAnyVehicle(playerid)) return SendErrorMessage(playerid, -1, "O jogador não está em um veículo!");
  5368.         vehicleid = GetPlayerVehicleID(otherplayerid);
  5369.         SetVehicleHealth(vehicleid, vida);
  5370.         format(_string, 128, "%s (%d) definiu a vida de um/uma %s (%d), dirigida por \"%s\" (%d), para %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, ReturnPlayerNameEx(otherplayerid), otherplayerid, vida);
  5371.         AdminWarning(COLOR_YELLOW, _string);
  5372.         format(_string, 128, "%s (%d) definiu/setou a vida de seu/sua %s (%d) para %.00f.", ReturnPlayerNameEx(playerid), playerid, ReturnVehicleNameID(vehicleid), vehicleid, vida);
  5373.         SendWarningMessage(otherplayerid, -1, _string);
  5374.         return 1;
  5375.     }
  5376.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5377. }
  5378.  
  5379. CMD:clima(playerid, params[])
  5380.     return cmd_tempo(playerid, params);
  5381.  
  5382. CMD:tempo(playerid, params[])
  5383. {
  5384.     format(_largestring, 1280, "%s - /tempo %s", ReturnFullName(playerid), params);
  5385.     CommandLog(_largestring);
  5386.     new weather;
  5387.     if (sscanf(params, "d", weather) || weather < 0)
  5388.     {
  5389.         format(_string, sizeof (_string), "\"/%s [clima]\"", Command_GetDisplayNamed("tempo", playerid));
  5390.         return SendCommandMessage(playerid, -1, _string);
  5391.     }
  5392.     if(PlayerInfo[playerid][pAdmin] >= 3)
  5393.     {
  5394.         SetWeather(weather);
  5395.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s acaba de mudar o clima para o clima{0064FF}%d{AFAFAF}!", weather);
  5396.         OOCMessage(COLOR_OOC, _string);
  5397.         return 1;
  5398.     }
  5399.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5400. }
  5401.  
  5402. CMD:tapa(playerid, params[])
  5403. {
  5404.     format(_largestring, 1280, "%s - /tapa %s", ReturnFullName(playerid), params);
  5405.     CommandLog(_largestring);
  5406.     new otherplayerid, Float:vida, Float:slx, Float:sly, Float:slz;
  5407.     if (sscanf(params, "u", otherplayerid))
  5408.     {
  5409.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("tapa", playerid));
  5410.         return SendCommandMessage(playerid, -1, _string);
  5411.     }
  5412.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5413.     {
  5414.         GetPlayerHealth(otherplayerid, vida);
  5415.         SetPlayerHealth(otherplayerid, vida-5);
  5416.         GetPlayerPos(otherplayerid, slx, sly, slz);
  5417.         SetPlayerPos(otherplayerid, slx, sly, slz+5);
  5418.         PlayerPlaySound(otherplayerid, 1130, slx, sly, slz+5);
  5419.         format(_string, 128, "%s (%d) deu um tapa em %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5420.         AdminWarning(COLOR_YELLOW, _string);
  5421.         format(_string, 128, "%s (%d) lhe deu um tapa.", ReturnPlayerNameEx(playerid), playerid);
  5422.         SendWarningMessage(otherplayerid, -1, _string);
  5423.         return 1;
  5424.     }
  5425.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5426. }
  5427.  
  5428. CMD:mute(playerid, params[])
  5429.     return cmd_calar(playerid, params);
  5430.  
  5431. CMD:mutar(playerid, params[])
  5432.     return cmd_calar(playerid, params);
  5433.  
  5434. CMD:calar(playerid, params[])
  5435. {
  5436.     format(_largestring, 1280, "%s - /calar %s", ReturnFullName(playerid), params);
  5437.     CommandLog(_largestring);
  5438.     new otherplayerid;
  5439.     if (sscanf(params, "u", otherplayerid))
  5440.     {
  5441.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("calar", playerid));
  5442.         return SendCommandMessage(playerid, -1, _string);
  5443.     }
  5444.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5445.     {
  5446.         if(GetPVarInt(otherplayerid, "Muted"))
  5447.         {
  5448.             format(_string, 128, "%s (%d) liberou %s (%d) para falar novamente.", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5449.             AdminWarning(COLOR_YELLOW, _string);
  5450.             format(_string, 128, "%s (%d) lhe liberou para falar novamente.", ReturnPlayerNameEx(playerid), playerid);
  5451.             SendWarningMessage(otherplayerid, -1, _string);
  5452.         }
  5453.         else
  5454.         {
  5455.             format(_string, 128, "%s (%d) proibiu de falar/calou %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5456.             AdminWarning(COLOR_YELLOW, _string);
  5457.             format(_string, 128, "%s (%d) lhe proibiu de falar novamente/calou.", ReturnPlayerNameEx(playerid), playerid);
  5458.             SendWarningMessage(otherplayerid, -1, _string);
  5459.         }
  5460.         return 1;
  5461.     }
  5462.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5463. }
  5464.  
  5465. CMD:kick(playerid, params[])
  5466. {
  5467.     format(_largestring, 1280, "%s - /kick %s", ReturnFullName(playerid), params);
  5468.     CommandLog(_largestring);
  5469.     new otherplayerid, reason[128];
  5470.     if (!strval(params))
  5471.     {
  5472.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("kick", playerid));
  5473.         return SendCommandMessage(playerid, -1, _string);
  5474.     }
  5475.     sscanf(params, "us[128]", otherplayerid, reason);
  5476.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5477.     {
  5478.         if(!strval(reason))
  5479.         {
  5480.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s kickou %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5481.             Broadcast(COLOR_SYSTEM, _string);
  5482.             format(_string, sizeof(_string), "%s kickou %s do serivor. Motivo não informado.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5483.             KickLog(_string);
  5484.             Kick(otherplayerid);
  5485.             return 1;
  5486.         }
  5487.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s kickou %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5488.         Broadcast(COLOR_SYSTEM, _string);
  5489.         format(_string, sizeof(_string), "%s kickou %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5490.         KickLog(_string);
  5491.         Kick(otherplayerid);
  5492.         return 1;
  5493.     }
  5494.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5495. }
  5496.  
  5497. CMD:fakekick(playerid, params[])
  5498. {
  5499.     format(_largestring, 1280, "%s - /fakekick %s", ReturnFullName(playerid), params);
  5500.     CommandLog(_largestring);
  5501.     new otherplayerid, reason[128];
  5502.     if (!strval(params))
  5503.     {
  5504.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("fakekick", playerid));
  5505.         return SendCommandMessage(playerid, -1, _string);
  5506.     }
  5507.     sscanf(params, "us[128]", otherplayerid, reason);
  5508.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5509.     {
  5510.         if(!strval(reason))
  5511.         {
  5512.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s kickou %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5513.             Broadcast(COLOR_SYSTEM, _string);
  5514.             return 1;
  5515.         }
  5516.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s kickou %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5517.         Broadcast(COLOR_SYSTEM, _string);
  5518.         return 1;
  5519.     }
  5520.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5521. }
  5522.  
  5523. CMD:fakekickmsg(playerid, params[])
  5524. {
  5525.     format(_largestring, 1280, "%s - /fakekickmsg %s", ReturnFullName(playerid), params);
  5526.     CommandLog(_largestring);
  5527.     new otherplayerid, reason[128];
  5528.     if (!strval(params))
  5529.     {
  5530.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("fakekickmsg", playerid));
  5531.         return SendCommandMessage(playerid, -1, _string);
  5532.     }
  5533.     sscanf(params, "us[128]", otherplayerid, reason);
  5534.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5535.     {
  5536.         if(!strval(reason))
  5537.         {
  5538.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s kickou %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5539.             Broadcast(COLOR_SYSTEM, _string);
  5540.             SendClientMessage(otherplayerid, 0xA9C4E4AA, "Server closed the connection.");
  5541.             return 1;
  5542.         }
  5543.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s kickou %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5544.         Broadcast(COLOR_SYSTEM, _string);
  5545.         SendClientMessage(otherplayerid, 0xA9C4E4AA, "Server closed the connection.");
  5546.         return 1;
  5547.     }
  5548.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5549. }
  5550.  
  5551. CMD:ban(playerid, params[])
  5552. {
  5553.     format(_largestring, 1280, "%s - /ban %s", ReturnFullName(playerid), params);
  5554.     CommandLog(_largestring);
  5555.     new otherplayerid, reason[128];
  5556.     if (!strval(params))
  5557.     {
  5558.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("ban", playerid));
  5559.         return SendCommandMessage(playerid, -1, _string);
  5560.     }
  5561.     sscanf(params, "us[128]", otherplayerid, reason);
  5562.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5563.     {
  5564.         if(!strval(reason))
  5565.         {
  5566.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5567.             Broadcast(COLOR_SYSTEM, _string);
  5568.             format(_string, sizeof(_string), "%s baniu %s do serivor. Motivo não informado.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5569.             BanLog(_string);
  5570.             Ban(otherplayerid);
  5571.             return 1;
  5572.         }
  5573.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5574.         Broadcast(COLOR_SYSTEM, _string);
  5575.         format(_string, sizeof(_string), "%s baniu %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5576.         BanLog(_string);
  5577.         Kick(otherplayerid);
  5578.         return 1;
  5579.     }
  5580.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5581. }
  5582.  
  5583. CMD:fakeban(playerid, params[])
  5584. {
  5585.     format(_largestring, 1280, "%s - /fakeban %s", ReturnFullName(playerid), params);
  5586.     CommandLog(_largestring);
  5587.     new otherplayerid, reason[128];
  5588.     if (!strval(params))
  5589.     {
  5590.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("fakeban", playerid));
  5591.         return SendCommandMessage(playerid, -1, _string);
  5592.     }
  5593.     sscanf(params, "us[128]", otherplayerid, reason);
  5594.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5595.     {
  5596.         if(!strval(reason))
  5597.         {
  5598.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5599.             Broadcast(COLOR_SYSTEM, _string);
  5600.             return 1;
  5601.         }
  5602.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5603.         Broadcast(COLOR_SYSTEM, _string);
  5604.         return 1;
  5605.     }
  5606.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5607. }
  5608.  
  5609. CMD:fakebankick(playerid, params[])
  5610. {
  5611.     format(_largestring, 1280, "%s - /fakebankick %s", ReturnFullName(playerid), params);
  5612.     CommandLog(_largestring);
  5613.     new otherplayerid, reason[128];
  5614.     if (!strval(params))
  5615.     {
  5616.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("fakebankick", playerid));
  5617.         return SendCommandMessage(playerid, -1, _string);
  5618.     }
  5619.     sscanf(params, "us[128]", otherplayerid, reason);
  5620.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5621.     {
  5622.         if(!strval(reason))
  5623.         {
  5624.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5625.             Broadcast(COLOR_SYSTEM, _string);
  5626.             format(_string, sizeof(_string), "%s kickou %s do serivor por meio de /fakebankick. Motivo não informado.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5627.             KickLog(_string);
  5628.             Kick(otherplayerid);
  5629.             return 1;
  5630.         }
  5631.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5632.         Broadcast(COLOR_SYSTEM, _string);
  5633.         format(_string, sizeof(_string), "%s kickou %s do serivor por meio de /fakebankick. Motivo: \"%s\".", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5634.         KickLog(_string);
  5635.         Kick(otherplayerid);
  5636.         return 1;
  5637.     }
  5638.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5639. }
  5640.  
  5641. CMD:fakebanmsg(playerid, params[])
  5642. {
  5643.     format(_largestring, 1280, "%s - /fakekickmsg %s", ReturnFullName(playerid), params);
  5644.     CommandLog(_largestring);
  5645.     new otherplayerid, reason[128];
  5646.     if (!strval(params))
  5647.     {
  5648.         format(_string, sizeof (_string), "\"/%s [nome/id] [razão - opcional]\"", Command_GetDisplayNamed("fakekickmsg", playerid));
  5649.         return SendCommandMessage(playerid, -1, _string);
  5650.     }
  5651.     sscanf(params, "us[128]", otherplayerid, reason);
  5652.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5653.     {
  5654.         if(!strval(reason))
  5655.         {
  5656.             format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor.", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid));
  5657.             Broadcast(COLOR_SYSTEM, _string);
  5658.             SendClientMessage(otherplayerid, 0xA9C4E4AA, "Server closed the connection.");
  5659.             return 1;
  5660.         }
  5661.         format(_string, sizeof(_string), "{AFAFAF}[{FF9900}!{AFAFAF}] %s baniu %s do serivor. Motivo: \"%s\"", ReturnPlayerNameEx(playerid), ReturnPlayerNameEx(otherplayerid), reason);
  5662.         Broadcast(COLOR_SYSTEM, _string);
  5663.         SendClientMessage(otherplayerid, 0xA9C4E4AA, "Server closed the connection.");
  5664.         return 1;
  5665.     }
  5666.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5667. }
  5668.  
  5669. CMD:congelar(playerid, params[])
  5670. {
  5671.     format(_largestring, 1280, "%s - /congelar %s", ReturnFullName(playerid), params);
  5672.     CommandLog(_largestring);
  5673.     new otherplayerid;
  5674.     if (sscanf(params, "u", otherplayerid))
  5675.     {
  5676.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("congelar", playerid));
  5677.         return SendCommandMessage(playerid, -1, _string);
  5678.     }
  5679.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5680.     {
  5681.         if(GetPVarInt(otherplayerid, "Frozen"))
  5682.         {
  5683.             format(_string, 128, "%s (%d) descongelou %s (%d)", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5684.             AdminWarning(COLOR_YELLOW, _string);
  5685.             DeletePVar(otherplayerid, "Frozen");
  5686.             TogglePlayerControllable(playerid, 1);
  5687.             format(_string, 128, "%s (%d) lhe descongelou.", ReturnPlayerNameEx(playerid), playerid);
  5688.             SendWarningMessage(otherplayerid, -1, _string);
  5689.         }
  5690.         else
  5691.         {
  5692.             format(_string, 128, "%s (%d) congelou %s (%d).", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5693.             AdminWarning(COLOR_YELLOW, _string);
  5694.             SetPVarInt(otherplayerid, "Frozen", 1);
  5695.             TogglePlayerControllable(playerid, 0);
  5696.             format(_string, 128, "%s (%d) lhe congelou.", ReturnPlayerNameEx(playerid), playerid);
  5697.             SendWarningMessage(otherplayerid, -1, _string);
  5698.         }
  5699.         return 1;
  5700.     }
  5701.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5702. }
  5703.  
  5704. CMD:descongelar(playerid, params[])
  5705. {
  5706.     format(_largestring, 1280, "%s - /descongelar %s", ReturnFullName(playerid), params);
  5707.     CommandLog(_largestring);
  5708.     new otherplayerid;
  5709.     if (sscanf(params, "u", otherplayerid))
  5710.     {
  5711.         format(_string, sizeof (_string), "\"/%s [nome/id]\"", Command_GetDisplayNamed("descongelar", playerid));
  5712.         return SendCommandMessage(playerid, -1, _string);
  5713.     }
  5714.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5715.     {
  5716.         format(_string, 128, "%s (%d) descongelou %s (%d)", ReturnPlayerNameEx(playerid), playerid, ReturnPlayerNameEx(otherplayerid), otherplayerid);
  5717.         AdminWarning(COLOR_YELLOW, _string);
  5718.         DeletePVar(otherplayerid, "Frozen");
  5719.         TogglePlayerControllable(playerid, 1);
  5720.         format(_string, 128, "%s (%d) lhe descongelou.", ReturnPlayerNameEx(playerid), playerid);
  5721.         SendWarningMessage(otherplayerid, -1, _string);
  5722.         return 1;
  5723.     }
  5724.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5725. }
  5726.  
  5727. CMD:GMX(playerid, params[])
  5728. {
  5729.     format(_largestring, 1280, "%s - /gmx %s", ReturnFullName(playerid), params);
  5730.     CommandLog(_largestring);
  5731.     if(PlayerInfo[playerid][pAdmin] >= 1337)
  5732.     {
  5733.         format(_string, 128, "{AFAFAF}[{A9C4E4}!{AFAFAF}] %s inicializou um reinício do servidor.", ReturnPlayerNameEx(playerid));
  5734.         Broadcast(COLOR_YELLOW, _string);
  5735.         format(_string, 128, "{AFAFAF}[{A9C4E4}!{AFAFAF}] Em quinze segundos, todos serão removidos do servidor.", ReturnPlayerNameEx(playerid));
  5736.         Broadcast(COLOR_YELLOW, _string);
  5737.         format(_string, 128, "{AFAFAF}[{A9C4E4}!{AFAFAF}] Seus dados serão salvos nesse período. Por precaução, tire uma SS do seu /stats AGORA.", ReturnPlayerNameEx(playerid));
  5738.         Broadcast(COLOR_YELLOW, _string);
  5739.         format(_string, 128, "{AFAFAF}[{A9C4E4}!{AFAFAF}] E deslogue, para ter certeza de que sua conta foi salva.", ReturnPlayerNameEx(playerid));
  5740.         printf("[SYS]: %s iniciou um GMX.", ReturnPlayerNameEx(playerid));
  5741.         SetTimer("GameModeExitFunc", 15000, 0);
  5742.         return 1;
  5743.     }
  5744.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5745. }
  5746.  
  5747. CMD:admins(playerid, params[])
  5748. {
  5749.     format(_largestring, 1280, "%s - /admins %s", ReturnFullName(playerid), params);
  5750.     CommandLog(_largestring);
  5751.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}!{AFAFAF}] Pessoal Administrativo Online {AFAFAF}[{A9C4E4}!{AFAFAF}]");
  5752.     foreach(Player, i)
  5753.     {
  5754.         if(PlayerInfo[i][pAdmin] >= 1)
  5755.         {
  5756.             if(GetPVarInt(playerid, "AdminDuty")) format(_string, 128, "{AFAFAF}[{A9C4E4}!{AFAFAF}] %s (%d) - Nível %d - {00CF00}EM TRABALHO ADMINISTRATIVO{AFAFAF}.", ReturnPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
  5757.             else format(_string, 128, "{AFAFAF}[{A9C4E4}!{AFAFAF}] %s (%d) - Nível %d - {CF0000}FORA DE TRABALHO ADMINISTRATIVO{AFAFAF}.", ReturnPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
  5758.             SendClientMessage(playerid, COLOR_YELLOW, _string);
  5759.         }
  5760.     }
  5761.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}!{AFAFAF}] ======================= {AFAFAF}[{A9C4E4}!{AFAFAF}]");
  5762.     return 1;
  5763. }
  5764.  
  5765. CMD:ajuda(playerid, params[])
  5766.     return cmd_comandos(playerid, params);
  5767.  
  5768. CMD:comandos(playerid, params[])
  5769. {
  5770.     format(_largestring, 1280, "%s - /ajuda %s", ReturnFullName(playerid), params);
  5771.     CommandLog(_largestring);
  5772.     SendSystemMessage(playerid, -1, "/ajudaplayer - /ajudageral - /ajudaarma - /ajudacarro - /forum");
  5773.     SendSystemMessage(playerid, -1, "Para uma lista detalhada com todos os comandos e suas funções, consulte nosso fórum.");
  5774.     if(PlayerInfo[playerid][pAdmin] >= 1) SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}!{AFAFAF}] /adminajuda /aajuda /ah {AFAFAF}[{A9C4E4}!{AFAFAF}]");
  5775.     return 1;
  5776. }
  5777.  
  5778. CMD:ajudaplayer(playerid, params[])
  5779. {
  5780.     format(_largestring, 1280, "%s - /ajudaplayer %s", ReturnFullName(playerid), params);
  5781.     CommandLog(_largestring);
  5782.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}AJUDA/CHAT{AFAFAF}] (/re)latar(/relatorio) - (/sos)/duvida - (/carid)/vehid - (/o)oc - /lerooc - /lerfam - /lerpm");
  5783.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}AJUDA/CHAT{AFAFAF}] (/togcanim)/chatanim - /ver - /membros - (/animlist)/animacoes(/anims) - /stats(/rg) - /oldcar");
  5784.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}CHAT{AFAFAF}] /codenome - /codenomewt - (/wt)/walkie - (/r)adio - /sotaque - /ame - /me - /do - (/l)/falar4");
  5785.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}CHAT{AFAFAF}] /b - (/ba)ixo - (/g)ritar - (/freq)uencia(/canal) - /pm - (/s)ussurrar - (/cs)/carrosussurrar(/cw)4");
  5786.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}OUTROS{AFAFAF}] /descricao");
  5787.     return 1;
  5788. }
  5789.  
  5790. CMD:ajudaarma(playerid, params[])
  5791. {
  5792.     format(_largestring, 1280, "%s - /ajudararma %s", ReturnFullName(playerid), params);
  5793.     CommandLog(_largestring);
  5794.     SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}!{AFAFAF}] (/parma)/pegararma - (/jarma)/jogararma");
  5795.     return 1;
  5796. }
  5797.  
  5798. CMD:aajuda(playerid, params[])
  5799.     return cmd_adminajuda(playerid, params);
  5800.  
  5801. CMD:ah(playerid, params[])
  5802.     return cmd_adminajuda(playerid, params);
  5803.  
  5804. CMD:adminajuda(playerid, params[])
  5805. {
  5806.     format(_largestring, 1280, "%s - /comandos %s", ReturnFullName(playerid), params);
  5807.     CommandLog(_largestring);
  5808.     if(PlayerInfo[playerid][pAdmin] < 1) return SendErrorMessage(playerid, -1, "Você não tem autorização pra utilizar isso.");
  5809.     new admin = PlayerInfo[playerid][pAdmin];
  5810.     if(admin >= 1)
  5811.     {
  5812.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] /pegarip - /desbanirip - /checararmas - (/ar)/aceitarrelatorio - (/rr)/rejeitarrelatorio");
  5813.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] (/aj)/aceitarajuda - (/desligarooc)/noooc - (/ao)/adminooc(/aooc) - /checar");
  5814.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] /verpm - (/a)dmin - (/lsw)/lersystemwarning - (/lac)/leradminchat - (/law)/leradminwarning");
  5815.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] /irlv - /ir - (/puxar)/trazer - (/irv)/irveiculo - (/tv)/trazerveiculo - (/rv)/repararveiculo");
  5816.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] (/rvp)/repararveiculoplayer - /tapa - (/mute)/calar - /kick - /fakekick - /fakekickmsg ");
  5817.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] /ban - /fakeban - /fakebanmsg - /fakebankick - /congelar - /descongelar - /atrabalhar");
  5818.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL I{AFAFAF}] /pegarip - /desbanirip");
  5819.     }
  5820.     if(admin >= 2)
  5821.     {
  5822.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL II{AFAFAF}] /enchervida - /enchercolete - (/svc) /setarvidacarro - (/svcp) /setarvidacarroplayer");
  5823.     }
  5824.     if(admin >= 3)
  5825.     {
  5826.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL III{AFAFAF}] /setarvida - /setarcolete - (/dvc) /darvidacarro - (/dvcp) /darvidacarroplayer - (/tempo)/clima");
  5827.     }
  5828.     if(admin >= 4)
  5829.     {
  5830.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL IV{AFAFAF}] /dararma - /darvida - /darcolete");
  5831.     }
  5832.     if(admin >= 1337)
  5833.     {
  5834.         SendClientMessage(playerid, -1, "{AFAFAF}[{A9C4E4}NÍVEL 1337{AFAFAF}] /gmx - /daradmin - /darlider");
  5835.     }
  5836.     return 1;
  5837. }
  5838.  
  5839. CMD:atrabalho(playerid, params[])
  5840.     return cmd_atrabalhar(playerid, params);
  5841.  
  5842. CMD:atrabalhar(playerid, params[])
  5843. {
  5844.     format(_largestring, 1280, "%s - /atrabalhar %s", ReturnFullName(playerid), params);
  5845.     CommandLog(_largestring);
  5846.     if(PlayerInfo[playerid][pAdmin] >= 1)
  5847.     {
  5848.         if(GetPVarInt(playerid, "AdminDuty"))
  5849.         {
  5850.             format(_string, 128, "%s (%d) saiu de trabalho administrativo.", ReturnPlayerNameEx(playerid), playerid);
  5851.             AdminWarning(COLOR_YELLOW, _string);
  5852.             DeletePVar(playerid, "AdminDuty");
  5853.             SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  5854.             SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  5855.             SetPlayerColor(playerid,0xFFFFFF00);
  5856.             format(_string, 128, "{AFAFAF}[{FF9900}!{AFAFAF}]%s (%d) acaba de {CF0000}sair{AFAFAF} de trabalho administrativo.", ReturnPlayerNameEx(playerid), playerid);
  5857.             Broadcast(-1, _string);
  5858.         }
  5859.         else
  5860.         {
  5861.             format(_string, 128, "%s (%d) entrou trabalho administrativo.", ReturnPlayerNameEx(playerid), playerid);
  5862.             AdminWarning(COLOR_YELLOW, _string);
  5863.             SetPVarInt(playerid, "AdminDuty", 1);
  5864.             SetPlayerArmour(playerid, 99999999999999);
  5865.             SetPlayerHealth(playerid, 99999999999999);
  5866.             SetPlayerColor(playerid,0xFBEE04FF);
  5867.             format(_string, 128, "{AFAFAF}[{FF9900}!{AFAFAF}]%s (%d) acaba de {00CF00}entrar{AFAFAF} em trabalho administrativo.", ReturnPlayerNameEx(playerid), playerid);
  5868.             Broadcast(-1, _string);
  5869.         }
  5870.         return 1;
  5871.     }
  5872.     else return SendErrorMessage(playerid, COLOR_GRAD2, "Você não pode usar isso.");
  5873. }
  5874.  
  5875. CMD:f(playerid, params[])
  5876.     return cmd_factionchat(playerid, params);
  5877.  
  5878. CMD:factionchat(playerid, params[])
  5879. {
  5880.     format(_largestring, 1280, "%s - /factionchat %s", ReturnFullName(playerid), params);
  5881.     CommandLog(_largestring);
  5882.     if(GetPVarInt(playerid, "Muted")) return SendErrorMessage(playerid, -1, "Você foi proibido de falar/calado/mutado por um administrador!");
  5883.     new text[128];
  5884.     if (sscanf(params, "s[128]", text))
  5885.     {
  5886.         format(_string, sizeof (_string), "\"/%s [texto]\"", Command_GetDisplayNamed("factionchat", playerid));
  5887.         return SendCommandMessage(playerid, -1, _string);
  5888.     }
  5889.     if(PlayerInfo[playerid][pFaction] == 0) return SendErrorMessage(playerid, -1, "Você não tem uma facção.");
  5890.     format(text, 128, "(( %s %s: %s ))", GetPlayerRank(playerid), ReturnPlayerNameEx(playerid), text);
  5891.     SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_FAMILY, text);
  5892.     return 1;
  5893. }
  5894.  
  5895. CMD:membros(playerid, params[])
  5896. {
  5897.     format(_largestring, 1280, "%s - /membros %s", ReturnFullName(playerid), params);
  5898.     CommandLog(_largestring);
  5899.     if(PlayerInfo[playerid][pFaction] == 0) return SendErrorMessage(playerid, -1, "Você não tem uma facção.");
  5900.     new faction = PlayerInfo[playerid][pFaction];
  5901.     format(_string, 128, "{AFAFAF}[{7BDDA5}!{AFAFAF}] Membros online (%s) [{7BDDA5}!{AFAFAF}]", FactionInfo[faction][fName]);
  5902.     SendClientMessage(playerid, -1, _string);
  5903.     foreach(Player, i)
  5904.     {
  5905.         if(PlayerInfo[i][pFaction] == faction)
  5906.         {
  5907.             format(_string, 128, "{AFAFAF}[{7BDDA5}!{AFAFAF}] {7BDDA5}%s{AFAFAF} - {7BDDA5}%s{AFAFAF} ({7BDDA5}%d{AFAFAF}) - Cargo {7BDDA5}%d{AFAFAF} [{7BDDA5}!{AFAFAF}]", GetPlayerRank(playerid), ReturnPlayerNameEx(i), i, PlayerInfo[i][pRank]);
  5908.             SendClientMessage(playerid, -1, _string);
  5909.         }
  5910.     }
  5911.     return 1;
  5912. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement