Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=================== [ Includes do Game Mode ] ===========================
- #include <a_samp>
- #include <dini>
- //=================== [ Defines do Game Mode ] ===========================
- #define DialogAdmin 1570#
- #define senha
- #define Adms "Admins/%s.ini"
- //=================== [ Static's do Game Mode ] ===========================
- static i_ServerSeconds;
- static i_ServerMinutes;
- static i_ServerHours;
- static i_ServerDays;
- static i_ServerMonths;
- static i_ServerYears;
- //=================== [ Defines de Corres ] ===========================
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_AZULBB 0xCCCCFFFF
- #define COLOR_LARANJA 0xFF830000
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_LIGHTRED 0xFF6347AA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_DBLUE 0x2641FEAA
- #define ErrorColor 0xFF0000FF
- #define GreyColor 0x999999FF
- #define BroadCastColor 0xFFFF00FF
- #define BroadCastColor2 0x33FF00FF
- #define ActionColor 0x9900FFFF
- #define BroadCastWarningColor 0xFF0066FF
- #define COLOR_GREEN BroadCastColor
- #define VERDE 0x33FF00FF
- //=================== [ Define dialogs ] ===========================
- #define DialogoLogar 33
- #define DialogoRegistrar 34
- //=================== [ Player Info ] ===========================
- enum pInfo
- {
- pKey[128],
- pName[64],
- pLevel,
- pAdmin,
- pCash,
- pReg,
- pVip,
- pSocio,
- pMaconha,
- pCrack,
- pCocaina,
- pLider,
- pMembro,
- pCargo,
- pMatou,
- pMorreu,
- pRespeito,
- pOrigem,
- pHorasjogadas,
- pSkin,
- pEmprego,
- pTutorial,
- pLocal,
- pLoged,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- enum pCrime
- {
- pBplayer[32],
- pAccusing[32],
- pAccusedof[32],
- pVictim[32],
- };
- new PlayerCrime[MAX_PLAYERS][pCrime];
- //=================== [ Arryais (float) ] ===========================
- new Float:TelePos[MAX_PLAYERS][6];
- //=================== [ Arryais (text) ] ===========================
- new Text:forum2[MAX_PLAYERS];
- new Text:txtTimeDisp;
- new Text:txtDateDisp;
- //=================== [ Arryais (news) ] ===========================
- new admhide[MAX_PLAYERS];
- new year, month,day;
- new hour, minute, second;
- new gstring[200];
- new TempoAdministrador;
- new admtrampando[MAX_PLAYERS];
- new sendername[MAX_PLAYER_NAME];
- new BigEar[MAX_PLAYERS];
- new gPlayerLogged[MAX_PLAYERS];
- new gPlayerLogTries[MAX_PLAYERS];
- new ConsumingMoney[MAX_PLAYERS];
- new CurrentMoney[MAX_PLAYERS];
- new playermoney[MAX_PLAYERS];
- new CreatedCars[100];
- new CreatedCar = 0;
- new cdivulgar[MAX_PLAYERS];
- new PlayerPaintballing[MAX_PLAYERS];
- //new Text:Forum[MAX_PLAYERS];
- //new MaxPlayers;
- new TotalOnline;
- new NicksProibidos[][MAX_PLAYER_NAME] ={
- "com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7",
- "lpt8","lpt9","clock$","prn","nul","con","CON","con","con1","aux","aux1","prn","PRN","AUX","BPF","BPG","BPL",
- "Server_Lixao","crashar_servidor","Crashar_Servidor","com1.aux.com.ipt3"
- };
- //=================== [ Forwards (usando em publics) ] ===========================
- forward MessageAdmins(COLOR,const string[],level);
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- forward OnPlayerCommandText(playerid, cmdtext[]);
- forward MensagensRandomicas();
- forward Encriptar(string[]);
- forward SetPlayerSpawn(playerid);
- forward split(const strsrc[], strdest[][], delimiter);
- forward SetPlayerUnjail();
- forward GameModeExitFunc();
- forward ini_GetKey( line[] );
- forward ini_GetValue( line[] );
- forward OtherTimer();
- forward forum(playerid);
- forward PlayersOnline();
- forward Encrypt(string[]);
- forward SetPlayerCriminal(playerid,declare,reason[]);
- //=================== [ Main Do Game Mode ] ====================================
- main()
- {
- print("\n\n|--------------------------------|");
- print("Projeto Gamemode construido do 0");
- print("Data de Ínicio: 6/3/2011");
- print("Scripter's:jonas_OwNer");
- print("|------------------------------------|\n\n");
- }
- //=================== [ Stock que verifica o Nome do Player ] ===========================
- stock pNome(playerid)
- {
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- return nome;
- }
- stock PlayerName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
- return Name;
- }
- //=================== [ Ongamemodeinit nucleo do GM ] ===========================
- public OnGameModeInit()
- {
- //=================== [ Codigos do Rcon ] ===========================
- SetGameModeText("BG RP v0.1");
- SendRconCommand("hostname ..:: |>> [RPG] Brasil [4]ever v0.1 <<| ::..");
- //=================== [ Outros Codigos ] ===========================
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- //=================== [ Veiculos ] ===========================
- AddPlayerClass(29,-1549.1127,696.8275,7.1797,324.8698,0,0,0,0,0,0);
- AddStaticVehicle(474,-1565.0460,635.6127,6.7661,181.9424,0,0);//Hermes
- AddStaticVehicle(401,-1522.8557,905.6686,6.7661,359.2625,0,0);//Bravura
- AddStaticVehicle(555,-1695.8822,834.6603,24.4614,91.0338,0,0);//Windsor
- AddStaticVehicle(415,-1553.5587,685.4747,6.8019,5.1831,0,0); // fod
- AddStaticVehicle(415,-1553.1975,696.6088,6.8019,356.2798,0,0); // fod
- AddStaticVehicle(415,-1538.8088,718.9227,6.8014,356.7770,0,0);
- //=================== [ Objetos ] ===========================
- CreateObject(4639, -2590.287598, 1358.478638, 7.743454, 0.0000, 0.0000, 41.2530);
- CreateObject(989, -2589.342285, 1358.919189, 10.665578, 0.0000, 0.0000, 329.9197);
- CreateObject(5822, -2656.021240, 1350.445801, 10.939837, 0.0000, 0.0000, 184.6749);
- CreateObject(8210, -2620.526367, 1329.473877, 9.287321, 0.0000, 0.0000, 43.8313);
- CreateObject(3749, -2593.792480, 1355.989624, 11.897477, 0.0000, 0.0000, 42.1124);
- CreateObject(987, -2659.707031, 1305.786987, 6.000000, 0.0000, 0.0000, 8.5944);
- CreateObject(987, -2649.254883, 1307.261475, 6.158150, 0.0000, 0.0000, 24.0642);
- CreateObject(987, -2587.155518, 1362.786133, 6.191296, 0.0000, 0.0000, 81.6464);
- CreateObject(987, -2585.611816, 1373.678955, 6.125481, 0.0000, 0.0000, 87.6625);
- CreateObject(8210, -2605.264160, 1401.605591, 9.218561, 0.0000, 0.0000, 317.8876);
- CreateObject(8210, -2684.917480, 1378.942993, 9.049091, 0.0000, 0.0000, 88.5219);
- CreateObject(8210, -1719.526611, 96.281364, 7.710401, 0.0000, 0.0000, 48.1284);
- CreateObject(8210, -1740.554077, 60.530273, 7.805194, 0.0000, 0.0000, 269.7592);
- CreateObject(8210, -1740.798218, -3.488058, 7.955191, 0.0000, 0.0000, 91.1002);
- CreateObject(8210, -1690.831421, -82.406937, 5.655715, 0.0000, 0.0000, 312.7310);
- CreateObject(8210, -1664.006104, 117.819084, 5.655715, 0.0000, 0.0000, 45.5501);
- CreateObject(8210, -1626.802734, 155.407089, 5.541300, 0.0000, 0.0000, 44.6907);
- CreateObject(8210, -1591.893921, 151.627151, 6.197569, 0.0000, 0.0000, 313.5905);
- CreateObject(8210, -1561.523438, 120.049675, 5.655715, 0.0000, 0.0000, 315.3093);
- CreateObject(8210, -1725.471924, -40.147419, 5.655715, 0.0000, 0.0000, 303.2772);
- CreateObject(3279, -1542.472046, 477.722198, 6.263100, 0.0000, 0.0000, 268.2809);
- CreateObject(3279, -1565.602295, 442.006805, 6.255300, 0.0000, 0.0000, 326.2528);
- CreateObject(3279, -1387.468750, 479.509308, 6.263100, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -1236.652344, 479.435913, 6.263100, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -1236.688843, 438.265289, 6.106500, 0.0000, 0.0000, 359.1406);
- CreateObject(3279, -1595.786255, 402.327698, 6.263100, 0.0000, 0.0000, 320.2367);
- CreateObject(3279, -1725.053467, 268.537598, 6.263100, 0.0000, 0.0000, 327.9717);
- CreateObject(3279, -1628.375732, 367.598999, 6.263100, 0.0000, 0.0000, 314.9999);
- CreateObject(3279, -1663.824463, 334.888092, 6.263100, 0.0000, 0.0000, 311.5621);
- CreateObject(3279, -1696.161255, 305.195404, 6.263100, 0.0000, 0.0000, 317.5782);
- CreateObject(3279, -1493.663452, 479.570404, 6.263100, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -1440.654541, 479.534302, 6.263100, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -1326.381348, 479.501099, 6.256500, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -1325.588745, 438.266388, 6.188100, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -1657.192261, 262.435089, 6.113100, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1601.592041, 262.395386, 6.138100, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1546.663696, 262.405212, 6.088100, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1495.587280, 262.413513, 6.141300, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1447.094849, 262.390808, 6.138100, 0.0000, 0.0000, 179.9996);
- CreateObject(3279, -1435.998779, 294.222290, 6.131500, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1398.171997, 294.195099, 6.156500, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1361.093750, 294.197113, 6.163100, 0.0000, 0.0000, 89.9994);
- CreateObject(3279, -1330.072876, 312.873810, 6.188100, 0.0000, 0.0000, 179.9996);
- CreateObject(3279, -1329.697144, 372.826111, 6.113100, 0.0000, 0.0000, 179.9996);
- CreateObject(3279, -1329.718384, 408.504303, 6.138100, 0.0000, 0.0000, 179.9996);
- CreateObject(3268, -1539.929077, 370.517395, 6.187500, 0.0000, 0.0000, 269.9998);
- CreateObject(3268, -1573.855835, 370.495087, 6.187500, 0.0000, 0.0000, 269.9998);
- CreateObject(3749, -1527.275879, 481.966400, 12.038100, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1497.820557, 481.839996, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1479.790161, 481.806091, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1467.789551, 481.816315, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1455.862793, 481.824097, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1444.867188, 481.826599, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1426.639526, 481.715302, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1414.680054, 481.707306, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1402.738037, 481.709106, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1391.683350, 481.695801, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1373.802124, 481.743988, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1361.842041, 481.737793, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1349.916870, 481.722107, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1341.278198, 481.738800, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1312.563843, 481.755310, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1300.578979, 481.756989, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1288.642456, 481.746002, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1276.755859, 481.747986, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1264.823242, 481.743805, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1252.875854, 481.733704, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1240.915771, 481.740601, 6.187500, 0.0000, 0.0000, 179.9996);
- CreateObject(987, -1733.655396, 263.317993, 6.187500, 0.0000, 0.0000, 345.3896);
- CreateObject(987, -1722.126831, 260.311096, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1710.155762, 260.301788, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1698.192139, 260.304993, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1686.186646, 260.299988, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1674.234741, 260.295898, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1652.468384, 260.139099, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1640.496460, 260.136688, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1628.503540, 260.139801, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1617.659058, 260.116791, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1596.919189, 260.155487, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1584.978394, 260.171387, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1573.010132, 260.173798, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1562.735474, 260.174011, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1541.996338, 260.127411, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1530.056763, 260.129303, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1518.126831, 260.123596, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1511.654541, 260.115204, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1490.919556, 260.124207, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1478.941284, 260.127686, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1466.987671, 260.144287, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1458.789063, 260.139313, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1444.838379, 267.050201, 6.187500, 0.0000, 0.0000, 89.9994);
- CreateObject(987, -1444.846436, 278.988312, 6.187500, 0.0000, 0.0000, 89.9994);
- CreateObject(987, -1431.327759, 291.906403, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1419.372437, 291.901398, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1414.301758, 291.896912, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1393.502441, 291.907288, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1381.528442, 291.897797, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1377.153564, 291.906097, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1356.418945, 291.931702, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1353.520752, 291.919403, 6.187500, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1341.673584, 291.902191, 6.187500, 0.0000, 0.0000, 44.9993);
- CreateObject(987, -1336.280151, 297.297302, 6.187500, 0.0000, 0.0000, 44.9993);
- CreateObject(987, -1327.812744, 317.541504, 6.187500, 0.0000, 0.0000, 89.9994);
- CreateObject(987, -1327.822876, 329.503296, 6.187500, 0.0000, 0.0000, 89.9994);
- CreateObject(1662, 982.332092, 754.719971, 12.064900, 0.0000, 0.0000, 212.8931);
- CreateObject(1662, 397.031403, 1021.231018, 29.640900, 0.0000, 0.0000, 213.7525);
- CreateObject(1662, 416.230713, 2700.482422, 61.952499, 0.0000, 0.0000, 191.2525);
- CreateObject(993, -1701.797363, 694.623108, 25.504400, 0.0000, 0.0000, 269.9998);
- CreateObject(993, -1701.798584, 704.617920, 25.504400, 0.0000, 0.0000, 269.9998);
- CreateObject(993, -1696.602173, 718.333130, 25.504400, 0.0000, 0.0000, 0.0000);
- CreateObject(993, -1701.790527, 713.657104, 25.504400, 0.0000, 0.0000, 269.9998);
- CreateObject(968, -1572.186279, 658.869507, 6.712300, 0.0000, 0.0000, 269.9998);
- CreateObject(983, -1432.054199, 291.770203, 5.578700, 90.2400, 1.7180, 268.2809);
- CreateObject(983, -1444.617554, 291.357697, 9.046000, 269.7591, 279.2130, 97.2530);
- CreateObject(987, -1452.079956, 292.217285, 6.037400, 0.0000, 0.0000, 0.0000);
- CreateObject(983, -1439.472656, 292.035797, 8.071000, 90.2400, 87.6617, 2.5775);
- CreateObject(983, -1438.703857, 292.062805, 8.071000, 90.2400, 91.9589, 359.1406);
- CreateObject(983, -1401.913574, 291.725006, 8.096000, 91.0994, 90.2400, 0.0000);
- CreateObject(983, -1400.844971, 291.752014, 8.096000, 91.0994, 89.3806, 0.0000);
- CreateObject(983, -1444.116455, 481.940887, 8.196000, 90.2400, 90.2400, 0.0000);
- CreateObject(983, -1442.999390, 481.915100, 8.171000, 269.7591, 86.8023, 355.7028);
- CreateObject(983, -1497.074585, 481.971008, 8.246000, 89.3806, 88.5211, 0.0000);
- CreateObject(983, -1522.110840, 482.095886, 10.285600, 89.3806, 0.0000, 269.9998);
- CreateObject(983, -1523.385498, 482.126801, 10.308300, 89.3806, 91.0994, 358.2811);
- CreateObject(12839, -2551.482910, 953.723511, 70.673897, 0.0000, 0.0000, 0.0000);
- CreateObject(1270, -1571.645996, 645.897156, 7.034597, 0.0000, 0.0000, 67.5000);
- CreateObject(987, -1571.989624, 676.162170, 9.712734, 0.0000, 0.0000, 90.0000);
- CreateObject(987, -1571.992554, 666.053223, 9.712734, 0.0000, 0.0000, 90.0000);
- CreateObject(987, -1583.579468, 646.173279, 9.712738, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1595.432251, 646.101257, 9.712738, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1607.335205, 646.172119, 9.712738, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1619.202881, 646.241760, 9.712738, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1631.079224, 646.233826, 9.712738, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1641.496338, 646.087402, 9.712738, 0.0000, 0.0000, 0.0000);
- CreateObject(987, -1641.367188, 657.927368, 9.712738, 0.0000, 0.0000, 270.0000);
- CreateObject(987, -1641.362305, 669.784546, 9.712738, 0.0000, 0.0000, 270.0000);
- CreateObject(987, -1641.441650, 676.441467, 9.712738, 0.0000, 0.0000, 270.0000);
- CreateObject(3550, -1571.712158, 648.813904, 10.878860, 0.0000, 0.0000, 0.0000);
- CreateObject(3475, -1572.007690, 649.137268, 12.088913, 0.0000, 0.0000, 180.0000);
- CreateObject(3475, -1572.112549, 653.538208, 11.987762, 0.0000, 0.0000, 0.0000);
- CreateObject(3550, -1571.587036, 653.584167, 10.910962, 0.0000, 0.0000, 0.0000);
- //=================== [ Veiculos ] ===========================
- AddPlayerClass(249,-2500.6243,-705.0093,279.7344,5.5812,0,0,0,0,0,0); // paisagen
- AddStaticVehicle(487,2184.7444,-989.7562,72.5752,167.8220,54,29); // heli
- AddStaticVehicle(494,2174.6384,-995.1772,62.8670,168.8737,36,13); // carro
- AddStaticVehicle(409,-2643.9001,1379.0566,6.9614,89.9158,0,0); // limoo.O
- AddStaticVehicle(409,-2644.0823,1373.4092,6.9599,89.8031,0,0); // limoo.O
- AddStaticVehicle(409,-2644.2107,1368.2054,6.9605,89.9603,0,0); // limoo.O
- AddStaticVehicle(520,-2670.8213,1345.9985,17.7161,270.2014,0,0); // hydra o certooooooooooooo
- AddStaticVehicle(432,-2643.5322,1337.1980,7.1776,270.8201,43,0); // rinobase
- AddStaticVehicle(444,-2645.0742,1344.8915,7.5358,270.4459,32,53); // monsterbase
- AddStaticVehicle(481,-2685.2893,1341.1033,16.5163,271.2230,46,46); // bmxbase
- AddStaticVehicle(481,-2686.2542,1351.2836,16.5131,264.1203,46,46); // bmxbase
- AddStaticVehicle(522,-2677.5386,1332.7638,16.5630,170.5911,6,25); // nrgbase
- AddStaticVehicle(522,-2673.6870,1332.6533,16.5548,177.5616,6,25); // nrgbase
- AddStaticVehicle(522,-2670.7629,1332.7754,16.5636,176.6977,6,25); // nrgbase
- AddStaticVehicle(522,-2668.2419,1332.7229,16.5653,178.3863,6,25); // nrgbase
- AddStaticVehicle(420,-2616.5950,-96.6816,4.1157,90.9115,6,1); // taxi kbabaum
- AddStaticVehicle(428,-2037.5372,137.5136,28.9600,90.1398,0,0); // carroseguroetira
- AddStaticVehicle(428,-1587.8529,652.0657,7.3092,359.2706,0,0); // carroseguroetira
- AddStaticVehicle(428,-1599.5914,652.1916,7.3105,0.4959,0,0); // carroseguroetira
- AddStaticVehicle(428,-1777.4722,957.6854,25.0058,89.6173,0,0); // carrosegurobanco
- AddStaticVehicle(438,-1995.0477,147.8887,27.6074,1.3322,0,0); // taxicolokkkkkkkkk
- AddStaticVehicle(413,-1988.3452,275.4367,35.2554,87.6447,88,1); // carrin:D
- AddStaticVehicle(475,-1988.2168,271.5232,34.9761,87.5821,2,39); // sabre
- AddStaticVehicle(475,-1991.4525,241.5675,34.9726,86.1969,2,39); // sabre
- AddStaticVehicle(475,-1993.8685,215.6526,27.4929,90.9924,2,39); // sabre
- AddStaticVehicle(449,-1943.7792,146.9424,26.1223,358.2097,1,74); // bondim:D
- AddStaticVehicle(481,-1998.2927,167.0615,27.1208,86.6163,3,3); // bmx
- AddStaticVehicle(481,-1998.0479,169.0941,27.2037,91.0608,6,6); // bmx
- AddStaticVehicle(522,-1997.9418,171.3165,27.2387,90.6109,3,3); // nrg
- AddStaticVehicle(522,-1997.6749,174.3806,27.2724,89.2741,3,8); // nrg
- AddStaticVehicle(596,-1588.2479,748.0393,-5.4903,359.9998,0,1); // carcop
- AddStaticVehicle(523,-1584.0217,749.4910,-5.6655,180.9966,0,0); // carcop
- AddStaticVehicle(523,-1579.8461,749.0732,-5.6571,181.8757,0,0); // car cop
- AddStaticVehicle(596,-1574.2565,742.4983,-5.5206,88.9996,0,1); // carcop
- AddStaticVehicle(523,-1573.5985,734.6492,-5.6689,90.0025,0,0); // carcop
- AddStaticVehicle(497,-1679.5951,706.1432,30.7954,90.5114,0,1); // helicop
- AddStaticVehicle(437,-1988.5007,162.0946,27.6508,0.0000,1,1); // busao
- AddStaticVehicle(437,-1988.3359,131.3477,27.6943,0.0000,1,1); // busao
- AddStaticVehicle(410,-2084.6643,-83.5934,34.7976,359.9729,5,5); // carroescola
- AddStaticVehicle(410,-2081.2825,-83.4888,34.8086,4.0901,6,6); // carroescola
- AddStaticVehicle(461,-2022.3977,-124.3720,34.7832,179.9717,6,6); // motoescola
- AddStaticVehicle(487,-2032.2460,-155.6209,35.4656,0.0060,1,6); // heliesc
- AddStaticVehicle(475,-2088.8313,-156.0123,35.0983,359.9812,6,6); // carroesc
- AddStaticVehicle(475,-2092.4036,-145.2734,35.0986,0.0400,6,6); // carroesc
- AddStaticVehicle(475,-2092.3503,-132.4997,35.0966,0.4676,6,6); // carroesc
- AddStaticVehicle(425,-2625.0493,1376.3342,7.6928,178.5375,43,0); // hunter base
- AddStaticVehicle(487,-1829.1174,1300.2819,59.8817,204.0558,54,29); // mavmoto
- AddStaticVehicle(453,-1556.1755,1260.8345,-0.5926,234.7669,69,69); // barco pesca
- AddStaticVehicle(453,-1565.1833,1259.7523,-0.5379,227.8785,69,69); // barcopesca
- AddStaticVehicle(453,-1578.2352,1260.0367,-0.0551,228.0564,69,69); // barco pesca
- AddStaticVehicle(493,-1474.4727,687.5856,-0.2037,268.8839,6,6); // barco escola
- AddStaticVehicle(453,-1473.3943,703.5046,-0.4342,272.7462,6,6); // barco escola
- AddStaticVehicle(420,-1703.0906,1003.9794,17.3778,91.1514,6,1); // taxi
- AddStaticVehicle(420,-1687.7856,999.6074,17.3444,270.7191,6,1); // taxi
- AddStaticVehicle(409,-1816.4678,1311.4034,50.2892,275.5558,1,1); // limomoto
- AddStaticVehicle(409,-1829.7208,1289.6337,50.2512,110.5457,1,1); // lomomoto
- AddStaticVehicle(433,-1307.1633,456.9036,7.5909,89.9428,0,0); // caminhao
- AddStaticVehicle(433,-1306.5189,463.9994,7.6436,89.6543,0,0); // caminhao
- AddStaticVehicle(433,-1306.5568,460.6202,7.6451,90.4466,0,0); // caminhao
- AddStaticVehicle(433,-1309.4952,444.8434,7.6132,55.0000,0,0); // caminhao
- AddStaticVehicle(433,-1307.2222,447.7583,7.5937,54.9896,0,0); // caminhao
- AddStaticVehicle(470,-1241.5155,445.2168,7.1593,326.9936,44,44); // carro
- AddStaticVehicle(470,-1232.7764,451.6962,7.1680,89.9980,0,0); // carro
- AddStaticVehicle(425,-1403.2001,465.2320,7.7642,181.0000,0,0); // hunter
- AddStaticVehicle(425,308.9300,1990.3328,18.2170,180.0703,0,0); // hunter
- AddStaticVehicle(425,309.5915,2056.1018,18.1976,180.0104,0,0); // hunter
- AddStaticVehicle(420,-1760.7411,947.5501,24.5889,88.3836,6,1); // taxi
- AddStaticVehicle(409,-1748.7618,947.4760,24.6092,90.4037,1,1); // limo
- AddStaticVehicle(411,-1766.7913,938.6655,24.5412,271.1453,106,1); // infernus
- AddStaticVehicle(522,-1736.4423,960.4474,24.4462,182.1301,6,25); // nrg
- AddStaticVehicle(522,-1739.7595,960.3264,24.4543,177.5538,6,25); // nrg
- AddStaticVehicle(522,-1745.4110,941.4691,24.4626,221.9273,6,25); // nrg
- AddStaticVehicle(522,-1750.4796,941.8193,24.4623,221.0215,6,25); // nrg
- AddStaticVehicle(522,-1754.1982,941.4381,24.4310,216.0489,6,25); // nrg
- AddStaticVehicle(601,-1634.5223,651.0744,6.9463,1.2162,1,1); // carroswat
- AddStaticVehicle(601,-1628.3643,651.0035,6.9464,0.3379,1,1); // carroswat
- AddStaticVehicle(528,-1622.5157,651.2703,7.2311,0.0320,0,0); // carros
- AddStaticVehicle(528,-1616.5774,651.2204,7.2304,359.9736,0,0); // carros
- AddStaticVehicle(449,-2006.5000,149.9260,27.9973,0.0000,1,74); // Trem
- AddStaticVehicle(528,-1610.4725,651.7099,7.2303,359.7540,0,0); // carros
- AddStaticVehicle(598,-1612.0612,673.4278,6.9086,180.2092,0,1); // cop
- AddStaticVehicle(598,-1605.8036,673.6382,6.9079,179.0647,0,1); // cop
- AddStaticVehicle(597,-1600.1277,673.6027,6.9104,178.9945,0,1); // cop
- AddStaticVehicle(597,-1594.0265,673.7087,6.9101,179.2024,0,1); // cop
- AddStaticVehicle(598,-1588.1838,673.4647,6.9087,179.4776,0,1); // cop
- AddStaticVehicle(522,-2724.4651,-281.1224,6.6027,179.2122,6,25); // nrg
- AddStaticVehicle(522,-2726.9248,-282.1533,6.6107,178.2187,6,25); // nrg
- AddStaticVehicle(522,-2729.4827,-281.4014,6.6029,177.8034,6,25); // nrg
- AddStaticVehicle(409,-2724.8152,-312.3762,6.9099,135.3034,1,1); // limo
- AddStaticVehicle(415,-2736.0916,-295.1672,6.7854,48.1586,25,1); // cheat
- AddStaticVehicle(415,-2739.5640,-298.3662,6.7794,47.0555,25,1); // cheat
- AddStaticVehicle(495,-2314.3425,-1666.3127,483.3794,197.9262,116,115); // rally
- AddStaticVehicle(495,-2307.9377,-1663.0397,484.0178,203.1399,116,115); // rally
- AddStaticVehicle(495,-2303.5154,-1656.6115,483.8733,203.7143,116,115); // rally
- AddStaticVehicle(495,-2295.4548,-1655.3750,483.5567,195.1631,116,115); // rally
- AddStaticVehicle(520,-1665.9806,1211.0782,33.6340,262.4589,0,0); // hydra carpalace
- AddStaticVehicle(449,-1943.8337,145.1943,26.1223,358.2105,1,74); //
- AddStaticVehicle(538,-1628.8099,44.0939,5.1400,135.1463,1,1); //
- AddStaticVehicle(416,-2543.9534,586.9307,14.6012,270.1252,1,3); // ambulancia
- AddStaticVehicle(416,-2543.5486,592.9233,14.6027,269.7417,1,3); // ambulancia
- AddStaticVehicle(416,-2543.3372,599.2736,14.6024,270.1265,1,3); // ambulancia
- AddStaticVehicle(416,-2543.5833,604.8004,14.6023,269.4493,1,3); // ambulancia
- AddStaticVehicle(416,-2618.9651,608.2448,14.6012,180.0322,1,3); // ambulancia
- AddStaticVehicle(475,-2675.1841,629.7386,14.2575,267.6788,33,0); // carrin
- AddStaticVehicle(475,-2711.7742,573.0886,14.3073,91.4278,33,0); // carrin
- AddStaticVehicle(431,-2244.8237,550.4213,35.2771,270.5651,75,59); // busao
- AddStaticVehicle(420,-1976.5347,172.4142,27.4680,92.4543,6,1); // taxi
- AddStaticVehicle(420,-1976.7189,177.3136,27.4662,91.2223,6,1); // taxi
- AddStaticVehicle(420,-1976.9609,183.9905,27.4664,91.8704,6,1); // taxi
- AddStaticVehicle(525,-2034.4309,170.1951,28.7173,270.4796,7,1); // carrofik
- AddStaticVehicle(443,-2039.9423,131.8226,29.4691,90.9714,20,1); // pakercerto
- AddStaticVehicle(524,-2032.5421,178.7775,29.7703,89.5988,61,27); // cimento
- AddStaticVehicle(515,-1974.4406,104.9566,28.7055,88.8895,24,77); // caminhao
- AddStaticVehicle(584,-1965.4539,97.5674,28.8349,90.5119,1,1); // carga
- AddStaticVehicle(450,-1964.6888,92.2853,28.3127,88.9350,1,1); // carga
- AddStaticVehicle(515,-1974.4156,84.5510,28.7057,85.6849,63,78); // caminhao
- //=================== [ Pickup's ] ===========================
- AddStaticPickup(1238,1,-1757.9701,960.9874,24.8828);
- AddStaticPickup(1274,1,-1746.1521,962.3468,24.8906);//cifrao hotel sf
- AddStaticPickup(1274,1,-2446.8564,522.0898,30.2816);//cifrao sa federal mint
- AddStaticPickup(1274,1,1721.8188,-1718.9016,13.5341);//cifrao atrium
- AddStaticPickup(1274,1,398.1302,-1805.6890,7.8380);//cifrao praia
- AddStaticPickup(1274,1,1022.5526,-1122.4902,23.8712);//cifrao teatro chines
- AddStaticPickup(1274,1,1958.0383,1343.7804,15.3746);
- AddStaticPickup(1274,1,2437.0090,1677.0514,10.8203);
- AddStaticPickup(355,2,1420.5509,2880.0674,10.8203); // ak-casa
- AddStaticPickup(355,2,1420.4403,2878.8823,10.8203); // ak-casa 2
- AddStaticPickup(355,2,1420.3854,2878.2087,10.8203); // ak-casa 3
- AddStaticPickup(355,2,1420.3193,2877.3989,10.8203); // ak-casa 4
- AddStaticPickup(355,2,1420.2551,2876.6152,10.8203); // ak-casa 5
- AddStaticPickup(323,2,1420.5574,2871.9189,10.8203); // dildo-casa
- AddStaticPickup(324,2,1420.5702,2871.1716,10.8203); // dildo-casa 2
- AddStaticPickup(372,2,1420.5946,2869.7476,10.8203); // tec9-casa
- AddStaticPickup(372,2,1420.6025,2869.2869,10.8203); // tec9-casa 2
- AddStaticPickup(372,2,1420.6144,2868.5874,10.8203); // tec9-casa 3
- AddStaticPickup(372,2,1420.6254,2867.9458,10.8203); // tec9 casa 4
- AddStaticPickup(365,2,1421.0168,2864.0776,10.8203); // motoserra-casa
- AddStaticPickup(341,2,1420.9180,2863.3215,10.8203); // motosserra casa
- AddStaticPickup(349,2,1423.6455,2861.7571,10.8203); // 12-casa
- AddStaticPickup(349,2,1422.6477,2861.6487,10.8203); // 12-casa 2
- AddStaticPickup(349,2,1420.4092,2861.1465,10.8203); // 12-casa 3
- AddStaticPickup(349,2,1421.7029,2859.5039,10.8203); // 12-casa 4
- AddStaticPickup(349,2,1424.0735,2859.1077,10.8203); // 12-casa 6
- AddStaticPickup(351,2,1430.5070,2880.6848,10.8203); // combat-casa
- AddStaticPickup(351,2,1429.6902,2879.9668,10.8203); // combat-casa 2
- AddStaticPickup(351,2,1427.5771,2881.7117,10.8203); // combat-casa 3
- AddStaticPickup(351,2,1427.4128,2877.2107,10.8203); // combat-casa 4
- AddStaticPickup(351,2,1430.7842,2876.5879,10.8203); // combat-casa 5
- txtTimeDisp = TextDrawCreate(632.0,25.0,"--:--:--");
- TextDrawUseBox(txtTimeDisp, 0);
- TextDrawFont(txtTimeDisp, 3);
- TextDrawSetShadow(txtTimeDisp,0);
- TextDrawSetOutline(txtTimeDisp,2);
- TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
- TextDrawColor(txtTimeDisp,COLOR_WHITE);
- TextDrawAlignment(txtTimeDisp,3);
- TextDrawLetterSize(txtTimeDisp,0.5,1.5);
- txtDateDisp = TextDrawCreate(620.0,5.0,"00/00/0000");
- TextDrawUseBox(txtDateDisp, 0);
- TextDrawFont(txtDateDisp, 3);
- TextDrawSetShadow(txtDateDisp,0);
- TextDrawSetOutline(txtDateDisp,2);
- TextDrawBackgroundColor(txtDateDisp,0x000000FF);
- TextDrawColor(txtDateDisp,COLOR_WHITE);
- TextDrawAlignment(txtDateDisp,3);
- TextDrawLetterSize(txtDateDisp,0.5,1.5);
- ProcessGameTime();
- SetTimer("ProcessGameTime", 1000, 1);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- forum2[i] = TextDrawCreate(1.000000,437.000000," ~b~||~g~Bem Vindo ao ~r~[RPG] Brasil [4]ever~b~||");
- TextDrawUseBox(forum2[i],1);
- TextDrawBoxColor(forum2[i],0x00000066);
- TextDrawTextSize(forum2[i],641.000000,0.000000);
- TextDrawAlignment(forum2[i],0);
- TextDrawBackgroundColor(forum2[i],0x000000ff);
- TextDrawFont(forum2[i],3);
- TextDrawLetterSize(forum2[i],0.399999,1.100000);
- TextDrawColor(forum2[i],0xffffffff);
- TextDrawSetOutline(forum2[i],1);
- TextDrawSetProportional(forum2[i],1);
- TextDrawSetShadow(forum2[i],1);
- }
- DisableInteriorEnterExits();
- }
- public Encrypt(string[])
- {
- for(new x=0; x < strlen(string); x++)
- {
- string[x] += (3^x) * (x % 15);
- if(string[x] > (0xff))
- {
- string[x] -= 256;
- }
- }
- return 1;
- }
- stock IsValidPassword(pass[])
- {
- for(new i; i<strlen(pass); i++)
- {
- if((pass[i] < 48) || (pass[i] > 57 && pass[i] < 67) || (pass[i] > 90 && pass[i]< 97) || (pass[i] > 122)) return 0;
- }
- return 1;
- }
- forward SavePlayerConfig(playerid);
- forward LoadPlayerConfig(playerid);
- public SavePlayerConfig(playerid)
- {
- new FilePath[256];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(FilePath, sizeof(FilePath), "%s.ini",pname);
- if(!dini_Exists(FilePath))
- {
- }
- else if(PlayerInfo[playerid][pLoged] == 1)
- {
- dini_Set(FilePath, "Name", PlayerInfo[playerid][pName]);
- dini_IntSet(FilePath, "Level", PlayerInfo[playerid][pLevel]);
- dini_IntSet(FilePath, "AdmLevel", PlayerInfo[playerid][pAdmin]);
- dini_IntSet(FilePath, "Money", GetPlayerMoneyEx(playerid));
- dini_IntSet(FilePath, "Vip", PlayerInfo[playerid][pVip]);
- dini_IntSet(FilePath, "Socio", PlayerInfo[playerid][pSocio]);
- dini_IntSet(FilePath, "Maconha", PlayerInfo[playerid][pMaconha]);
- dini_IntSet(FilePath, "Crack", PlayerInfo[playerid][pCrack]);
- dini_IntSet(FilePath, "Cocaina", PlayerInfo[playerid][pCocaina]);
- dini_IntSet(FilePath, "Lider", PlayerInfo[playerid][pLider]);
- dini_IntSet(FilePath, "Morreu", PlayerInfo[playerid][pMorreu]);
- dini_IntSet(FilePath, "Matou", PlayerInfo[playerid][pMatou]);
- dini_IntSet(FilePath, "Cargo", PlayerInfo[playerid][pCargo]);
- dini_IntSet(FilePath, "Respeito", PlayerInfo[playerid][pRespeito]);
- dini_IntSet(FilePath, "Origem", PlayerInfo[playerid][pOrigem]);
- dini_IntSet(FilePath, "HorasJogadas", PlayerInfo[playerid][pHorasjogadas]);
- dini_IntSet(FilePath, "Emprego", PlayerInfo[playerid][pEmprego]);
- dini_IntSet(FilePath, "Tutorial", PlayerInfo[playerid][pTutorial]);
- dini_IntSet(FilePath, "Local", PlayerInfo[playerid][pLocal]);
- printf("Conta de %s salva com sucesso.",PlayerInfo[playerid][pName]);
- }
- }
- public LoadPlayerConfig(playerid)
- {
- new FilePath[256];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(FilePath, sizeof(FilePath), "%s.ini",pname);
- if(!dini_Exists(FilePath))
- {
- dini_Create(FilePath);
- dini_Set(FilePath, "Name", PlayerInfo[playerid][pName]);
- dini_IntSet(FilePath, "Level",2);
- dini_IntSet(FilePath, "AdmLevel",0);
- dini_IntSet(FilePath, "Money",0);
- dini_IntSet(FilePath, "Vip", 0);
- dini_IntSet(FilePath, "Socio", 0);
- dini_IntSet(FilePath, "Maconha", 0);
- dini_IntSet(FilePath, "Crack", 0);
- dini_IntSet(FilePath, "Cocaina", 0);
- dini_IntSet(FilePath, "Lider", 0);
- dini_IntSet(FilePath, "Morreu", 0);
- dini_IntSet(FilePath, "Matou", 0);
- dini_IntSet(FilePath, "Cargo", 0);
- dini_IntSet(FilePath, "Respeito", 0);
- dini_IntSet(FilePath, "Origem", 0);
- dini_IntSet(FilePath, "HorasJogadas", 0);
- dini_IntSet(FilePath, "Emprego", 0);
- dini_IntSet(FilePath, "Tutorial", 0);
- dini_IntSet(FilePath, "Local", 0);
- GivePlayerMoneyEx(playerid,500);
- SetPlayerScore(playerid,1);
- printf("Conta de %s criada com sucesso.",PlayerInfo[playerid][pName]);
- }
- else
- {
- ResetPlayerMoneyEx(playerid);
- SetPlayerScore(playerid, dini_Int(FilePath, "Level"));
- PlayerInfo[playerid][pLevel] = dini_Int(FilePath, "Level");
- GivePlayerMoneyEx(playerid,dini_Int(FilePath, "Money"));
- PlayerInfo[playerid][pAdmin] = dini_Int(FilePath, "AdmLevel");
- PlayerInfo[playerid][pVip] = dini_Int(FilePath, "VipLevel");
- PlayerInfo[playerid][pSocio] = dini_Int(FilePath, "Socio");
- PlayerInfo[playerid][pMaconha] = dini_Int(FilePath, "Maconha");
- PlayerInfo[playerid][pCrack] = dini_Int(FilePath, "Crack");
- PlayerInfo[playerid][pCocaina] = dini_Int(FilePath, "Cocaina");
- PlayerInfo[playerid][pLider] = dini_Int(FilePath, "Lider");
- PlayerInfo[playerid][pMorreu] = dini_Int(FilePath, "Morreu");
- PlayerInfo[playerid][pMatou] = dini_Int(FilePath, "Matou");
- PlayerInfo[playerid][pCargo] = dini_Int(FilePath, "Cargo");
- PlayerInfo[playerid][pRespeito] = dini_Int(FilePath, "Respeito");
- PlayerInfo[playerid][pOrigem] = dini_Int(FilePath, "Origem");
- PlayerInfo[playerid][pHorasjogadas] = dini_Int(FilePath, "HorasJogadas");
- PlayerInfo[playerid][pEmprego] = dini_Int(FilePath, "Emprego");
- PlayerInfo[playerid][pTutorial] = dini_Int(FilePath, "Tutorial");
- PlayerInfo[playerid][pLocal] = dini_Int(FilePath, "Local");
- printf("Conta de %s carregada com sucesso.",PlayerInfo[playerid][pName]);
- }
- return 1;
- }
- //=================== [ Public de Mandar a Mensagem de lona distancia ] ===========================
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!BigEar[i])
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DialogoLogar)
- {
- if(response == 0) SendClientMessage(playerid,ErrorColor,"[BG]: É preciso se logar para jogar aqui."),Kick(playerid);
- else if(response == 1)
- {
- new tmp[256];
- new tmppass[64];
- strmid(tmp, inputtext, 0, strlen(inputtext), 75);
- new FilePathUser[256];
- format(FilePathUser, sizeof(FilePathUser), "%s.ini",PlayerInfo[playerid][pName]);
- if (!dini_Exists(FilePathUser))
- {
- SendClientMessage(playerid, ErrorColor, "[BG]: Você não está registrado.");
- return 1;
- }
- if(PlayerInfo[playerid][pLoged] == 1)
- {
- SendClientMessage(playerid, ErrorColor, "[BG]: Voce já está logado.");
- return 1;
- }
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,ErrorColor, "[BG]: /logar [Senha]");
- return 1;
- }
- format(FilePathUser, sizeof(FilePathUser), "%s.ini",PlayerInfo[playerid][pName]);
- strmid(PlayerInfo[playerid][pKey], dini_Get(FilePathUser,"Pass"), 0, strlen(dini_Get(FilePathUser,"Pass")), 255);
- strmid(tmppass, tmp, 0, strlen(tmp), 255);
- Encrypt(tmppass);
- new xIntPass = dini_Int(FilePathUser,"IntPass");
- if(strcmp(PlayerInfo[playerid][pKey],tmppass, true )==0||xIntPass == encodepass(tmp))
- {
- LoadPlayerConfig(playerid);
- dini_IntSet(FilePathUser,"IntPass",encodepass(tmp));
- SendClientMessage(playerid,BroadCastColor,"[BG]: Logado com sucesso!");
- SendClientMessage(playerid,VERDE,"[BG]: Tenha um bom jogo!");
- GivePlayerMoney(playerid, GetPlayerMoneyEx(playerid));
- PlayerInfo[playerid][pHorasjogadas] += 1;
- PlayerInfo[playerid][pLoged] = 1;
- TextDrawShowForPlayer(playerid, forum2[playerid]);
- TextDrawShowForPlayer(playerid,txtTimeDisp);
- TextDrawShowForPlayer(playerid,txtDateDisp);
- SpawnPlayer(playerid);
- }
- else
- {
- new string[256];
- format(string,sizeof(string),"Seja bem vindo %s.\nInsira sua senha:",PlayerInfo[playerid][pName]);
- ShowPlayerDialog(playerid,DialogoLogar,1,"Login",string,"Logar","Sair");
- SendClientMessage(playerid,VERDE,"[BG]: Senha Errada,tente novamente!");
- }
- }
- }
- if(dialogid == DialogoRegistrar)
- {
- if(response == 0) SendClientMessage(playerid,ErrorColor,"[BG]: É preciso se registrar para jogar aqui."),Kick(playerid);
- else if(response == 1)
- {
- new tmp[256];
- new tmppass[64];
- strmid(tmp, inputtext, 0, strlen(inputtext), 75);
- new FilePathUser[256];
- format(FilePathUser, sizeof(FilePathUser), "%s.ini",PlayerInfo[playerid][pName]);
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pLoged] == 1)
- {
- SendClientMessage(playerid, ErrorColor, "[BG]: Voce já esta logado.");
- return 1;
- }
- if (dini_Exists(FilePathUser))
- {
- SendClientMessage(playerid, ErrorColor, "[BG]: Este nick já esta registrado.");
- return 1;
- }
- if(!strlen(tmp))
- {
- new string[256];
- format(string,sizeof(string),"Tente Novamente %s, motivo: nenhuma senha.",PlayerInfo[playerid][pName]);
- ShowPlayerDialog(playerid,DialogoRegistrar,1,"Registre-se",string,"Registrar","Sair");
- return 1;
- }
- if(IsValidPassword(tmp))
- {
- dini_IntSet(FilePathUser,"IntPass",encodepass(tmp));
- strmid(tmppass, tmp, 0, strlen(tmp), 255);
- Encrypt(tmppass);
- ResetPlayerMoneyEx(playerid);
- LoadPlayerConfig(playerid);
- strmid(PlayerInfo[playerid][pKey], tmppass, 0, strlen(tmppass), 255);
- dini_Set(FilePathUser,"Pass",PlayerInfo[playerid][pKey]);
- PlayerInfo[playerid][pLoged] = 1;
- SendClientMessage(playerid,BroadCastColor,"[BG]: Registrado com Sucesso.");
- TextDrawShowForPlayer(playerid, forum2[playerid]);
- TextDrawShowForPlayer(playerid,txtTimeDisp);
- TextDrawShowForPlayer(playerid,txtDateDisp);
- SpawnPlayer(playerid);
- }
- else
- {
- new string[256];
- format(string,sizeof(string),"Tente Novamente %s, motivo: caracteres inválidos.",PlayerInfo[playerid][pName]);
- ShowPlayerDialog(playerid,DialogoRegistrar,1,"Registre-se",string,"Registrar","Sair");
- }
- }
- }
- }
- return 1;
- }
- public Encriptar(string[])
- {
- for(new x=0; x < strlen(string); x++)
- {
- string[x] += (3^x) * (x % 15);
- if(string[x] > (0xff))
- {
- string[x] -= 256;
- }
- }
- return 1;
- }
- public PlayersOnline()
- {
- TotalOnline = 0;
- for(new i=0; i<MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i)) {
- if(TotalOnline == 0){
- TotalOnline = 1;
- }
- else if (TotalOnline > 0){
- TotalOnline++;
- }
- }
- }
- return 1;
- }
- stock strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
- ReturnUser(text[], playerid = INVALID_PLAYER_ID)
- {
- new pos = 0;
- while (text[pos] < 0x21) // Strip out leading spaces
- {
- if (text[pos] == 0) return INVALID_PLAYER_ID; // No passed text
- pos++;
- }
- new userid = INVALID_PLAYER_ID;
- if (IsNumeric(text[pos])) // Check whole passed string
- {
- // If they have a numeric name you have a problem (although names are checked on id failure)
- userid = strval(text[pos]);
- if (userid >=0 && userid < MAX_PLAYERS)
- {
- if(!IsPlayerConnected(userid))
- {
- /*if (playerid != INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, 0xFF0000AA, "User not connected");
- }*/
- userid = INVALID_PLAYER_ID;
- }
- else
- {
- return userid; // A player was found
- }
- }
- /*else
- {
- if (playerid != INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Invalid user ID");
- }
- userid = INVALID_PLAYER_ID;
- }
- return userid;*/
- // Removed for fallthrough code
- }
- // They entered [part of] a name or the id search failed (check names just incase)
- new len = strlen(text[pos]);
- new count = 0;
- new name[MAX_PLAYER_NAME];
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- GetPlayerName(i, name, sizeof (name));
- if (strcmp(name, text[pos], true, len) == 0) // Check segment of name
- {
- if (len == strlen(name)) // Exact match
- {
- return i; // Return the exact player on an exact match
- // Otherwise if there are two players:
- // Me and MeYou any time you entered Me it would find both
- // And never be able to return just Me's id
- }
- else // Partial match
- {
- count++;
- userid = i;
- }
- }
- }
- }
- if (count != 1)
- {
- if (playerid != INVALID_PLAYER_ID)
- {
- if (count)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "No matching user found");
- }
- }
- userid = INVALID_PLAYER_ID;
- }
- return userid; // INVALID_USER_ID for bad return
- }
- //=================== [ Spawn do Player] ===========================
- public OnPlayerSpawn(playerid)
- {
- if(PlayerInfo[playerid][pOrigem] == 0)
- {
- SetPlayerPos(playerid,-1549.1127,696.8275,7.1797);
- SetPlayerInterior(playerid, 0);
- }
- if(PlayerInfo[playerid][pTutorial] == 0)
- {
- ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "Regras:", "-Este é um servidor de Roleplay, Simulação de vida real.\n\n-Nós estamos absolutamente interessados em jogadores que não façam DM e DB.\n\n-Você Não mata ninguem na vida real, nao rouba ninguem na vida real.\n\n-Se você for um civil, jogue como um civil. Se for gangster... Ai Sim, Poderá Matar e Roubar.\n\n-Mais Sem Matar Civis ou Pessoas Que Não Fizeram Nada Com Você.\n\nSeja Bem Vindo ao Projeto", "Concordo", "Discordo");
- PlayerInfo[playerid][pTutorial] = 1;
- }
- return 1;
- }
- //=================== [ Public dos comandos] ===========================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[128];
- new giveplayer[MAX_PLAYER_NAME];
- new playername[MAX_PLAYER_NAME];
- new cmd[128];
- new tmp[128];
- //new giveplayerid, moneys, idx;
- new idx;
- cmd = strtok(cmdtext, idx);
- //---------------------------------------[ Comandos de Admin ]--------------------------------------//
- if(strcmp(cmd,"/SetAdmin",true)==0)
- {
- new tmp2[256];
- tmp = strtok(cmdtext, idx);
- new id = ReturnUser(tmp);
- tmp2 = strtok(cmdtext, idx);
- new level = strval(tmp2);
- if(PlayerInfo[playerid][pAdmin] < 5) SendClientMessage(playerid,ErrorColor,"[BG]: Você Precisa Administrador Scripter para Usar Esse Comando.");
- else if(PlayerInfo[playerid][pAdmin]<= 4 && PlayerInfo[id][pAdmin]>=PlayerInfo[playerid][pAdmin]) SendClientMessage(playerid,ErrorColor,"[BG]: Você Não pode Seta o Level de um jogador com o level Maior ou Igual ao Seu.");
- else if(PlayerInfo[playerid][pAdmin]<= 4 && level>=PlayerInfo[playerid][pAdmin]) SendClientMessage(playerid,ErrorColor,"[BG]: Você Não pode Seta um level Maior ou Igual ao Seu.");
- else if(!IsPlayerConnected(id)) SendClientMessage(playerid,ErrorColor,"[BG]: Jogador Disconectado.");
- else if(!strlen(tmp)||!strlen(tmp2)) SendClientMessage(playerid,ErrorColor,"[BG]: /SetAdmin [playerid] [Level]");
- else if(level<0||level>1342) SendClientMessage(playerid,ErrorColor,"[BG]: Level de Admin Deve Ser Entre [1-1342].");
- else if(PlayerInfo[id][pLoged] == 0) SendClientMessage(playerid,ErrorColor,"[BG]: Jogador Não esta Logado.");
- else
- {
- //new string[256];
- PlayerInfo[id][pAdmin] = level;
- if(level==0) format(string, sizeof(string),"[BG]: '%s' Setou o Level Admin de '%s' Para %d (Jogador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
- else if(level==1) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Sub-Moderador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
- else if(level==2) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Moderador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
- else if(level==3) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Sub-Administrador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
- else if(level==4) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Administrador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
- else if(level==5) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Administrador Scripter).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
- MessageAdmins(COLOR_LIGHTRED,string,1);
- }
- return 1;
- }
- if(strcmp(cmd, "/ir", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /ir [id]");
- return 1;
- }
- new plname[MAX_PLAYER_NAME];
- new Float:plocx,Float:plocy,Float:plocz;
- new plo, world;
- plo = ReturnUser(tmp);
- world = GetPlayerVirtualWorld(plo);
- if (IsPlayerConnected(plo))
- {
- if(plo != INVALID_PLAYER_ID)
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- GetPlayerPos(plo, plocx, plocy, plocz);
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0);
- TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
- }
- else
- {
- SetPlayerPos(playerid,plocx,plocy+2, plocz);
- }
- SetPlayerVirtualWorld(playerid, world);
- SendClientMessage(playerid, 0x33FF00FF, "Você foi teleportado pelo Admin !");
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- GetPlayerName(plo, plname, MAX_PLAYER_NAME);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {}
- else { format(string, sizeof(string), "O Admin %s Foi Até %s.",playername,plname); }
- ProxDetector(30.0, playerid, string, 0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não esta autorizado a usar este comando!");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Esse não é um player ativo.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/tapa", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /tapa [id]");
- return 1;
- }
- new playa;
- new Float:slx, Float:sly, Float:slz;
- playa = ReturnUser(tmp);
- if (PlayerInfo[playerid][pAdmin] >=1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[playa][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não pode dar tapas em um Admin Dono !");
- return 1;
- }
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerPos(playa, slx, sly, slz);
- SetPlayerPos(playa, slx, sly, slz+12);
- PlayerPlaySound(playa, 1130, slx, sly, slz+12);
- printf("AdmCmd: %s slapped %s",sendername, giveplayer);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmCmd: %s ganhou um tapa de: Capetinha_Bozinho",giveplayer);
- }
- else
- {
- format(string, sizeof(string), "AdmCmd: %s ganhou um tapa de: %s",giveplayer ,sendername);
- }
- MessageAdmins(COLOR_LIGHTRED,string,1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/cveh", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] < 1338)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não esta autorizado a usar este comando!");
- return 1;
- }
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if(CreatedCar >= 96)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Já criaram muitos carros, destrua alguns primeiro /destruirid");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /cveh [IDCARRO] [COR1] [COR2]");
- return 1;
- }
- new car;
- car = strval(tmp);
- if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /cveh [IDCARRO] [COR1] [COR2]");
- return 1;
- }
- new COLOR1;
- COLOR1 = strval(tmp);
- if(COLOR1 < 0 || COLOR1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Número Da Cor tem que ser entre 0 e 126 !"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /cveh [IDCARRO] [COR1] [COR2]");
- return 1;
- }
- new COLOR2;
- COLOR2 = strval(tmp);
- if(COLOR2 < 0 || COLOR2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Número Da Cor tem que ser entre 0 e 126 !"); return 1; }
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- new carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
- CreatedCars[CreatedCar] = carid;
- CreatedCar ++;
- format(string, sizeof(string), " Veiculo %d Criado.", carid);
- SendClientMessage(playerid, COLOR_GREY, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/tapao", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /tapao [id]");
- return 1;
- }
- new playa;
- //new Float:shealth;
- new Float:slx, Float:sly, Float:slz;
- playa = ReturnUser(tmp);
- if (PlayerInfo[playerid][pAdmin] >=1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[playa][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não pode dar tapão em um Admin Dono !");
- return 1;
- }
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- //GetPlayerHealth(playa, shealth);
- //SetPlayerHealth(playa, shealth-5);
- GetPlayerPos(playa, slx, sly, slz);
- SetPlayerPos(playa, slx, sly, slz+130);
- SetPlayerHealth(playerid, 100.0);
- PlayerPlaySound(playa, 1130, slx, sly, slz+130);
- printf("AdmCmd: %s slapped %s",sendername, giveplayer);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmCmd: %s ganhou um tapao de: Capetinha_Bozinho",giveplayer);
- }
- else
- {
- format(string, sizeof(string), "AdmCmd: %s ganhou um tapao de: %s",giveplayer ,sendername);
- }
- MessageAdmins(COLOR_LIGHTRED,string,1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd,"/matar",true)==0 || strcmp(cmd,"/kill",true)==0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /matar [id]");
- return 1;
- }
- new playa;
- //new Float:shealth;
- playa = ReturnUser(tmp);
- if (PlayerInfo[playerid][pAdmin] >=1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[playa][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não pode matar um Admin Dono !");
- return 1;
- }
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- //GetPlayerHealth(playa, shealth);
- //SetPlayerHealth(playa, shealth-5);
- SetPlayerHealth(playa, 0.0);
- SetPlayerVirtualWorld(playa,0);
- printf("AdmCmd: %s matou %s",sendername, giveplayer);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmCmd: %s ganhou uma morte de: Capetinha_Bozinho",giveplayer);
- }
- else
- {
- format(string, sizeof(string), "AdmCmd: %s ganhou uma morte de: %s",giveplayer ,sendername);
- }
- MessageAdmins(COLOR_LIGHTRED,string,1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/ls", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, 1539.6094,-1694.4749,13.5469); LinkVehicleToInterior(tmpcar, 0);
- TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
- }
- else
- {
- SetPlayerPos(playerid, 1539.6094,-1694.4749,13.5469);
- }
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está autorizado a usar o comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/esconderijo", true) == 0 || strcmp(cmd, "/irin", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- else
- {
- SetPlayerPos(playerid, 1416.107000,0.268620,1000.926000);
- }
- SendClientMessage(playerid, COLOR_GRAD1, " Você Foi Teleportado!");
- SetPlayerInterior(playerid,1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não esta autorizado a usar este comando!!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/onibus", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, 1759.2711,-1849.1093,13.5781); LinkVehicleToInterior(tmpcar, 0);
- TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
- }
- else
- {
- SetPlayerPos(playerid, 1759.2711,-1849.1093,13.5781);
- }
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- SetPlayerInterior(playerid,0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está autorizado a usar o comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/lv", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7); LinkVehicleToInterior(tmpcar, 0);
- TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
- }
- else
- {
- SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
- }
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/sf", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, -1417.0,-295.8,14.1); LinkVehicleToInterior(tmpcar, 0);
- TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
- }
- else
- {
- SetPlayerPos(playerid, -1417.0,-295.8,14.1);
- }
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/entrarcarro", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USE: /entrarcarro [carro id]");
- return 1;
- }
- new testcar = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 3)
- {
- PutPlayerInVehicle(playerid, testcar, 1);
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/entrarcarro2", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USE: /entrarcarro [carro id]");
- return 1;
- }
- new testcar = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 3)
- {
- PutPlayerInVehicle(playerid, testcar, 0);
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/ircarro", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USE: /ircarro [carro id]");
- return 1;
- }
- new testcar = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- new Float:cwx2,Float:cwy2,Float:cwz2;
- GetVehiclePos(testcar, cwx2, cwy2, cwz2);
- if (GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, cwx2, cwy2, cwz2); LinkVehicleToInterior(tmpcar, 0);
- TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
- }
- else
- {
- SetPlayerPos(playerid, cwx2, cwy2, cwz2);
- }
- SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
- SetPlayerInterior(playerid,0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: (/a)dmin [admin chat]");
- return 1;
- }
- if(TentouDivulgar(result))
- {
- if(cdivulgar[playerid] >= 6)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui você não pode anunciar servidores!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor é uma merda, não divulgue-o aqui!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server também, uaheuhaeuhaeahe!");
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- Kick(playerid);
- }
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
- MessageAdmins(COLOR_YELLOW,string,1);
- cdivulgar[playerid] += 1;
- return 1;
- }
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
- MessageAdmins(COLOR_LIGHTBLUE, string, 1);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/creditos", true) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, 0xFFFF00FF, "|______________ Créditos ______________|");
- SendClientMessage(playerid, VERDE, "Game Mode Criado do 0(zero) por jonas_OwNer Dono do BGL");
- SendClientMessage(playerid, VERDE, "Game Mode Iniciado no dia 6 de Março de 2011 a Noite");
- return 1;
- }
- if(strcmp(cmd, "/rg", true) == 0)
- {
- new atext[20];
- if(PlayerInfo[playerid][pEmprego] == 0) { atext = "Desempregado"; }
- else if(PlayerInfo[playerid][pEmprego] == 1) { atext = "Empregado"; }
- new atext2[20];
- if(PlayerInfo[playerid][pOrigem] == 0) { atext2 = "San Fierro"; }
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, 0xFFFF00FF, "|__________________RG__________________|");
- format(gstring, sizeof(gstring), "Nivel:[%d] Dinheiro:[R$%d] AdmLevel:[%d]", PlayerInfo[playerid][pLevel],GetPlayerMoneyEx(playerid),PlayerInfo[playerid][pAdmin]);
- SendClientMessage(playerid, COLOR_AZULBB,gstring);
- format(gstring, sizeof(gstring), "Cargo:[%d] Horas Jogadas:[%d] Origem:[%s]", PlayerInfo[playerid][pCargo],PlayerInfo[playerid][pHorasjogadas],atext2);
- SendClientMessage(playerid, COLOR_AZULBB,gstring);
- format(gstring, sizeof(gstring), "Matou:[%d] Morreu:[%d] Emprego:[%s]", PlayerInfo[playerid][pMatou],PlayerInfo[playerid][pMorreu],atext);
- SendClientMessage(playerid, COLOR_AZULBB,gstring);
- format(gstring, sizeof(gstring), "Maconha:[%d] Cocaina:[%d] Crack:[%d]", PlayerInfo[playerid][pMaconha],PlayerInfo[playerid][pCocaina],PlayerInfo[playerid][pCrack]);
- SendClientMessage(playerid, COLOR_AZULBB,gstring);
- return 1;
- }
- if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] > 1337)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341) { return SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)"); }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- { SavePlayerConfig(i); }
- }
- GameModeExitFunc();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não tem autorização para dar GMX!");
- }
- }
- return 1;
- }
- if(strcmp(cmdtext, "/trabalhar", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] > 0)
- {
- admtrampando[playerid] = 0;
- GetPlayerName(playerid,sendername,sizeof(sendername));
- SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administração ______________|");
- format(string, 128, "Admin: %s ID(%d) está Jogando, Veja em /admins.",sendername, playerid);
- SendClientMessageToAll(COLOR_DBLUE, string);
- KillTimer(TempoAdministrador);
- ResetPlayerWeapons(playerid);
- SetPlayerHealth(playerid,100);
- getdate(year, month, day);
- gettime(hour,minute,second);
- format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
- }
- else
- {
- admtrampando[playerid] = 1;
- GetPlayerName(playerid,sendername,sizeof(sendername));
- SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administração ______________|");
- format(string, 128, "Admin: %s ID(%d) está Trabalhando, veja em /admins.",sendername, playerid);
- SendClientMessageToAll(COLOR_DBLUE, string);
- TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
- SetPlayerSkin(playerid,217);
- getdate(year, month, day);
- gettime(hour,minute,second);
- format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
- }
- }
- return 1;
- }
- return SendClientMessage(playerid, COLOR_LIGHTRED, "[BG]: Comando não reconhecido, digite /ajuda ou /relatorio e peça ajuda a uma Admin");
- }
- //=================== [ Quando o Player connecta no servidor ] ===========================
- public OnPlayerConnect(playerid)
- {
- for(new i; i<sizeof(NicksProibidos); i++)
- {
- if(strcmp(NicksProibidos[i],pNome(playerid),true)==0)
- {
- SendClientMessage(playerid,COLOR_AZULBB,"Você está usando um nome que é proibido no Servidor");
- Kick(playerid);
- }
- }
- PlayerInfo[playerid][pVip] = 0;
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pSocio] = 0;
- PlayerInfo[playerid][pMaconha] = 0;
- PlayerInfo[playerid][pCrack] = 0;
- PlayerInfo[playerid][pCocaina] = 0;
- PlayerInfo[playerid][pLider] = 0;
- PlayerInfo[playerid][pMembro] = 0;
- PlayerInfo[playerid][pRespeito] = 0;
- PlayerInfo[playerid][pOrigem] = 0;
- PlayerInfo[playerid][pHorasjogadas] = 0;
- PlayerInfo[playerid][pSkin] = 0;
- PlayerInfo[playerid][pEmprego] = 0;
- PlayerInfo[playerid][pTutorial] = 0;
- PlayerInfo[playerid][pLocal] = 255;
- PlayerPaintballing[playerid] = 0;
- admtrampando[playerid] = 0;
- gPlayerLogged[playerid] = 0;
- gPlayerLogTries[playerid] = 0;
- ConsumingMoney[playerid] = 0;
- CurrentMoney[playerid] = 0;
- PlayerInfo[playerid][pReg] = 0;
- }
- //=================== [ Quando o Player disconnecta do servidor ] ===========================
- public OnPlayerDisconnect(playerid,reason)
- {
- new string[256];
- switch(reason)
- {
- case 0: format(string, sizeof(string), "%s Saiu do server motivo: crash / Erro de Conexão", pNome(playerid));
- case 1: format(string, sizeof(string), "%s Saiu do server motivo: por conta própria", pNome(playerid));
- case 2: format(string, sizeof(string), "%s Saiu do server motivo: Kickado ou Banido", pNome(playerid));
- }
- ProxDetector(70.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- new string[256];
- SetPlayerInterior(playerid,1);
- SetPlayerCameraPos(playerid, -751.7545,456.2780,1368.6179);
- SetPlayerCameraLookAt(playerid, -788.8458,473.8009,1379.9878);
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- SendClientMessage(playerid,BroadCastColor," ");
- GameTextForPlayer(playerid,"~g~Seja bem vindo~n~~w~ao~n~~y~[RPG] Brasil [4]ever",5000,6);
- GetPlayerName(playerid,PlayerInfo[playerid][pName],40);
- if(PlayerInfo[playerid][pLoged] == 0)
- {
- new FilePath[256];
- format(FilePath, sizeof(FilePath), "%s.ini",PlayerInfo[playerid][pName]);
- if(dini_Exists(FilePath)) format(string,sizeof(string),"Seja bem vindo %s.\nInsira sua senha:",PlayerInfo[playerid][pName]),ShowPlayerDialog(playerid,DialogoLogar,1,"Login",string,"Logar","Sair");
- else if(!dini_Exists(FilePath))
- {
- SendClientMessage(playerid,BroadCastColor2,"Caso você já seja registrado, o servidor tornou-se Case Sensitive (Diferencia letra Minuscula de Maiuscula)");
- SendClientMessage(playerid,BroadCastColor2,"Ou seja se você se registrou: MeU_NiCk, Você deve logar-se com: MeU_NiCk.");
- format(string,sizeof(string),"Seja bem vindo %s.\nRegistre-se abaixo com uma senha:",PlayerInfo[playerid][pName]);
- //PlayerSave(playerid);
- ShowPlayerDialog(playerid,DialogoRegistrar,1,"Registrar",string,"Registrar","Sair");
- }
- }
- else SpawnPlayer(playerid);
- return 1;
- }
- stock encodepass(buf[])
- {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- public GameModeExitFunc()
- {
- GameTextForAll("~g~Restart",5000,6);
- TextDrawHideForAll(txtTimeDisp);
- TextDrawDestroy(txtTimeDisp);
- TextDrawHideForAll(txtDateDisp);
- TextDrawDestroy(txtDateDisp);
- GameModeExit();
- }
- public MessageAdmins(COLOR,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][pAdmin] >= level)
- {
- SendClientMessage(i, COLOR, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- stock TentouDivulgar(string[])
- {
- new x=0;
- for (new i = 0, j = strlen(string); i <= j; i++)
- {
- if (string[i] >= 46 && string[i] <= 58)
- {
- x+=1;
- }
- }
- if(x >= 8) return 1;
- return 0;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(PlayerPaintballing[killerid] == 0)
- {
- SetPlayerCriminal(killerid, 255, "Assasinato");
- PlayerInfo[killerid][pMatou] += 1;
- }
- }
- public SetPlayerCriminal(playerid,declare,reason[])
- {
- if(IsPlayerConnected(playerid))
- {
- new turned[MAX_PLAYER_NAME];
- new turner[MAX_PLAYER_NAME];
- strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
- GetPlayerName(playerid, turned, sizeof(turned));
- if (declare == 255)
- {
- format(turner, sizeof(turner), "Câmeras de Segurança");
- strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
- }
- }
- }
- forward ProcessGameTime();
- public ProcessGameTime()
- {
- new string[128];
- gettime(i_ServerHours, i_ServerMinutes, i_ServerSeconds);
- getdate(i_ServerYears, i_ServerMonths, i_ServerDays);
- format(string, sizeof string, "%02d:%02d:%02d", i_ServerHours, i_ServerMinutes, i_ServerSeconds);
- TextDrawSetString(txtTimeDisp, string);
- format(string, sizeof string, "%02d/%02d/%04d", i_ServerDays, i_ServerMonths, i_ServerYears);
- TextDrawSetString(txtDateDisp, string);
- SetWorldTime(i_ServerHours);
- for(new i = 0; i < MAX_PLAYERS; i++)SetPlayerTime(i, i_ServerHours, i_ServerMinutes);
- }
- stock GetPlayerMoneyEx(playerid)return playermoney[playerid];
- stock ResetPlayerMoneyEx(playerid)return playermoney[playerid] = 0;
- stock GivePlayerMoneyEx(playerid, ammount)return playermoney[playerid] += ammount;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement