Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //================== INCLUDES
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <DOF2>
- #define D_COMPRA 3000
- //================== VARS
- new Text:TxtTaser[MAX_PLAYERS][16];
- new Text:TxtManual[MAX_PLAYERS][20];
- new bool:InManual[MAX_PLAYERS];
- enum tInfo
- {
- bool:Taser,
- bool:TaserEmMaos,
- Dardos,
- DardosR,
- Bateria
- }
- new TaserInfo[MAX_PLAYERS][tInfo];
- new DataPort[MAX_PLAYERS][10][22];
- new DataPortDel[MAX_PLAYERS];
- new UltimoSave[MAX_PLAYERS];
- new bool:PrimeiroSpawn[MAX_PLAYERS];
- new TempoReload[MAX_PLAYERS];
- new bool:AtingidoTaser[MAX_PLAYERS];
- new bool:AtualizouTaser[MAX_PLAYERS];
- new bool:SemTaserEmMaos[MAX_PLAYERS];
- new Float:lifep[MAX_PLAYERS], Float:coletep[MAX_PLAYERS];
- //================== FORWARD'S
- forward StopTaser(playerid);
- forward StopAnim(playerid);
- forward RemoveAttach(playerid, slot);
- forward ReloadTaser(playerid);
- forward ATTaser(playerid, type);
- forward ATBateria(playerid);
- //================== MACROS
- new stringf[250];
- #define SendFormatMsg(%0,%1,%2,%3) format(stringf, sizeof(stringf),%2,%3) && SendClientMessage(%0, %1, stringf)
- //================== SA-MP CALLBACK'S
- public OnGameModeInit()
- {
- Create3DTextLabel("Digite: /comprar para ver\nos itens disponíveis", -1, 312.3958, -166.1394, 999.6010, 10.0, 0);
- for(new i; i < MAX_PLAYERS; i++)
- {
- //TEXTDRAW TASER
- TxtTaser[i][0] = TextDrawCreate(140.235229, 355.833312, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][0], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][0], 95.529396, 59.500000);
- TextDrawAlignment(TxtTaser[i][0], 1);
- TextDrawColor(TxtTaser[i][0], -1523963137);
- TextDrawSetShadow(TxtTaser[i][0], 0);
- TextDrawSetOutline(TxtTaser[i][0], 0);
- TextDrawFont(TxtTaser[i][0], 4);
- TxtTaser[i][1] = TextDrawCreate(152.470520, 341.250152, "Taser Info");
- TextDrawLetterSize(TxtTaser[i][1], 0.449999, 1.600000);
- TextDrawAlignment(TxtTaser[i][1], 1);
- TextDrawColor(TxtTaser[i][1], -1);
- TextDrawSetShadow(TxtTaser[i][1], 0);
- TextDrawSetOutline(TxtTaser[i][1], 1);
- TextDrawBackgroundColor(TxtTaser[i][1], 51);
- TextDrawFont(TxtTaser[i][1], 3);
- TextDrawSetProportional(TxtTaser[i][1], 1);
- TxtTaser[i][2] = TextDrawCreate(139.764816, 343.000000, "hud:radar_emmetGun");
- TextDrawLetterSize(TxtTaser[i][2], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][2], 10.823532, 11.083312);
- TextDrawAlignment(TxtTaser[i][2], 1);
- TextDrawColor(TxtTaser[i][2], -1);
- TextDrawSetShadow(TxtTaser[i][2], 0);
- TextDrawSetOutline(TxtTaser[i][2], 0);
- TextDrawFont(TxtTaser[i][2], 4);
- TxtTaser[i][3] = TextDrawCreate(143.117782, 358.583343, "hud:radar_saveGame");
- TextDrawLetterSize(TxtTaser[i][3], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][3], 10.823532, 11.083312);
- TextDrawAlignment(TxtTaser[i][3], 1);
- TextDrawColor(TxtTaser[i][3], -1);
- TextDrawSetShadow(TxtTaser[i][3], 0);
- TextDrawSetOutline(TxtTaser[i][3], 0);
- TextDrawFont(TxtTaser[i][3], 4);
- TxtTaser[i][4] = TextDrawCreate(156.235244, 354.500091, "N/A");
- TextDrawLetterSize(TxtTaser[i][4], 0.296117, 1.675832);
- TextDrawAlignment(TxtTaser[i][4], 1);
- TextDrawColor(TxtTaser[i][4], -1);
- TextDrawSetShadow(TxtTaser[i][4], 0);
- TextDrawSetOutline(TxtTaser[i][4], 1);
- TextDrawBackgroundColor(TxtTaser[i][4], 51);
- TextDrawFont(TxtTaser[i][4], 2);
- TextDrawSetProportional(TxtTaser[i][4], 1);
- TxtTaser[i][5] = TextDrawCreate(143.176620, 372.416687, "hud:radar_waypoint");
- TextDrawLetterSize(TxtTaser[i][5], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][5], 10.823532, 11.083312);
- TextDrawAlignment(TxtTaser[i][5], 1);
- TextDrawColor(TxtTaser[i][5], -1);
- TextDrawSetShadow(TxtTaser[i][5], 0);
- TextDrawSetOutline(TxtTaser[i][5], 0);
- TextDrawFont(TxtTaser[i][5], 4);
- TxtTaser[i][6] = TextDrawCreate(156.235198, 368.916748, "0 DARDOS");
- TextDrawLetterSize(TxtTaser[i][6], 0.296117, 1.675832);
- TextDrawAlignment(TxtTaser[i][6], 1);
- TextDrawColor(TxtTaser[i][6], -1);
- TextDrawSetShadow(TxtTaser[i][6], 0);
- TextDrawSetOutline(TxtTaser[i][6], 1);
- TextDrawBackgroundColor(TxtTaser[i][6], 51);
- TextDrawFont(TxtTaser[i][6], 2);
- TextDrawSetProportional(TxtTaser[i][6], 1);
- TxtTaser[i][7] = TextDrawCreate(143.235458, 385.666748, "hud:radar_triads");
- TextDrawLetterSize(TxtTaser[i][7], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][7], 10.823532, 11.083312);
- TextDrawAlignment(TxtTaser[i][7], 1);
- TextDrawColor(TxtTaser[i][7], -7143425);
- TextDrawSetShadow(TxtTaser[i][7], 0);
- TextDrawSetOutline(TxtTaser[i][7], 0);
- TextDrawBackgroundColor(TxtTaser[i][7], -1);
- TextDrawFont(TxtTaser[i][7], 4);
- TxtTaser[i][8] = TextDrawCreate(156.235321, 382.750183, "0 RESERVA");
- TextDrawLetterSize(TxtTaser[i][8], 0.296117, 1.675832);
- TextDrawAlignment(TxtTaser[i][8], 1);
- TextDrawColor(TxtTaser[i][8], -1);
- TextDrawSetShadow(TxtTaser[i][8], 0);
- TextDrawSetOutline(TxtTaser[i][8], 1);
- TextDrawBackgroundColor(TxtTaser[i][8], 51);
- TextDrawFont(TxtTaser[i][8], 2);
- TextDrawSetProportional(TxtTaser[i][8], 1);
- TxtTaser[i][9] = TextDrawCreate(164.823501, 399.833282, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][9], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][9], 45.647068, 12.833312);
- TextDrawAlignment(TxtTaser[i][9], 1);
- TextDrawColor(TxtTaser[i][9], -1);
- TextDrawSetShadow(TxtTaser[i][9], 0);
- TextDrawSetOutline(TxtTaser[i][9], 0);
- TextDrawFont(TxtTaser[i][9], 4);
- TxtTaser[i][10] = TextDrawCreate(166.235168, 401.583251, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][10], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][10], 5.176467, 9.333312);
- TextDrawAlignment(TxtTaser[i][10], 1);
- TextDrawColor(TxtTaser[i][10], 8781823);
- TextDrawSetShadow(TxtTaser[i][10], 0);
- TextDrawSetOutline(TxtTaser[i][10], 0);
- TextDrawFont(TxtTaser[i][10], 4);
- TxtTaser[i][11] = TextDrawCreate(173.823348, 401.416564, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][11], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][11], 5.176467, 9.333312);
- TextDrawAlignment(TxtTaser[i][11], 1);
- TextDrawColor(TxtTaser[i][11], 8781823);
- TextDrawSetShadow(TxtTaser[i][11], 0);
- TextDrawSetOutline(TxtTaser[i][11], 0);
- TextDrawFont(TxtTaser[i][11], 4);
- TxtTaser[i][12] = TextDrawCreate(181.411499, 401.833221, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][12], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][12], 5.176467, 9.333312);
- TextDrawAlignment(TxtTaser[i][12], 1);
- TextDrawColor(TxtTaser[i][12], 8781823);
- TextDrawSetShadow(TxtTaser[i][12], 0);
- TextDrawSetOutline(TxtTaser[i][12], 0);
- TextDrawFont(TxtTaser[i][12], 4);
- TxtTaser[i][13] = TextDrawCreate(188.999740, 401.666564, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][13], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][13], 5.176467, 9.333312);
- TextDrawAlignment(TxtTaser[i][13], 1);
- TextDrawColor(TxtTaser[i][13], 8781823);
- TextDrawSetShadow(TxtTaser[i][13], 0);
- TextDrawSetOutline(TxtTaser[i][13], 0);
- TextDrawFont(TxtTaser[i][13], 4);
- TxtTaser[i][14] = TextDrawCreate(196.587905, 401.499908, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][14], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][14], 5.176467, 9.333312);
- TextDrawAlignment(TxtTaser[i][14], 1);
- TextDrawColor(TxtTaser[i][14], 8781823);
- TextDrawSetShadow(TxtTaser[i][14], 0);
- TextDrawSetOutline(TxtTaser[i][14], 0);
- TextDrawFont(TxtTaser[i][14], 4);
- TxtTaser[i][15] = TextDrawCreate(204.176055, 401.916595, "LD_SPAC:white");
- TextDrawLetterSize(TxtTaser[i][15], 0.000000, 0.000000);
- TextDrawTextSize(TxtTaser[i][15], 5.176467, 9.333312);
- TextDrawAlignment(TxtTaser[i][15], 1);
- TextDrawColor(TxtTaser[i][15], 8781823);
- TextDrawSetShadow(TxtTaser[i][15], 0);
- TextDrawSetOutline(TxtTaser[i][15], 0);
- TextDrawFont(TxtTaser[i][15], 4);
- //--------------------------------------------------------------------------------------------
- //TEXTDRAW MANUAL
- TxtManual[i][0] = TextDrawCreate(484.235229, 274.166656, "LD_SPAC:white");
- TextDrawLetterSize(TxtManual[i][0], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][0], 122.823532, 162.749847);
- TextDrawAlignment(TxtManual[i][0], 1);
- TextDrawColor(TxtManual[i][0], -1);
- TextDrawSetShadow(TxtManual[i][0], 0);
- TextDrawSetOutline(TxtManual[i][0], 0);
- TextDrawFont(TxtManual[i][0], 4);
- TxtManual[i][1] = TextDrawCreate(486.588226, 277.083343, "LD_SPAC:white");
- TextDrawLetterSize(TxtManual[i][1], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][1], 118.117691, 18.083322);
- TextDrawAlignment(TxtManual[i][1], 1);
- TextDrawColor(TxtManual[i][1], 8650751);
- TextDrawSetShadow(TxtManual[i][1], 0);
- TextDrawSetOutline(TxtManual[i][1], 0);
- TextDrawFont(TxtManual[i][1], 4);
- TxtManual[i][2] = TextDrawCreate(487.529510, 275.916595, "Manual Taser");
- TextDrawLetterSize(TxtManual[i][2], 0.360588, 1.868334);
- TextDrawAlignment(TxtManual[i][2], 1);
- TextDrawColor(TxtManual[i][2], -1);
- TextDrawSetShadow(TxtManual[i][2], 0);
- TextDrawSetOutline(TxtManual[i][2], 1);
- TextDrawBackgroundColor(TxtManual[i][2], 5);
- TextDrawFont(TxtManual[i][2], 2);
- TextDrawSetProportional(TxtManual[i][2], 1);
- TxtManual[i][3] = TextDrawCreate(488.000000, 314.999786, "hud:radar_saveGame");
- TextDrawLetterSize(TxtManual[i][3], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][3], 9.882339, 9.916671);
- TextDrawAlignment(TxtManual[i][3], 1);
- TextDrawColor(TxtManual[i][3], -1);
- TextDrawSetShadow(TxtManual[i][3], 0);
- TextDrawSetOutline(TxtManual[i][3], 0);
- TextDrawFont(TxtManual[i][3], 4);
- TxtManual[i][4] = TextDrawCreate(486.588409, 296.916687, "~d~ Taser Info");
- TextDrawLetterSize(TxtManual[i][4], 0.264588, 1.366667);
- TextDrawAlignment(TxtManual[i][4], 1);
- TextDrawColor(TxtManual[i][4], -1);
- TextDrawSetShadow(TxtManual[i][4], 0);
- TextDrawSetOutline(TxtManual[i][4], 1);
- TextDrawBackgroundColor(TxtManual[i][4], 255);
- TextDrawFont(TxtManual[i][4], 3);
- TextDrawSetProportional(TxtManual[i][4], 1);
- TxtManual[i][5] = TextDrawCreate(499.764801, 313.250000, "Informa ultima data de dispardo.");
- TextDrawLetterSize(TxtManual[i][5], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][5], 1);
- TextDrawColor(TxtManual[i][5], -1);
- TextDrawSetShadow(TxtManual[i][5], 0);
- TextDrawSetOutline(TxtManual[i][5], 1);
- TextDrawBackgroundColor(TxtManual[i][5], 255);
- TextDrawFont(TxtManual[i][5], 1);
- TextDrawSetProportional(TxtManual[i][5], 1);
- TxtManual[i][6] = TextDrawCreate(487.588256, 329.416442, "hud:radar_waypoint");
- TextDrawLetterSize(TxtManual[i][6], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][6], 9.882339, 9.916671);
- TextDrawAlignment(TxtManual[i][6], 1);
- TextDrawColor(TxtManual[i][6], -1);
- TextDrawSetShadow(TxtManual[i][6], 0);
- TextDrawSetOutline(TxtManual[i][6], 0);
- TextDrawFont(TxtManual[i][6], 4);
- TxtManual[i][7] = TextDrawCreate(499.764739, 327.666748, "Informa quantidade de dardos");
- TextDrawLetterSize(TxtManual[i][7], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][7], 1);
- TextDrawColor(TxtManual[i][7], -1);
- TextDrawSetShadow(TxtManual[i][7], 0);
- TextDrawSetOutline(TxtManual[i][7], 1);
- TextDrawBackgroundColor(TxtManual[i][7], 255);
- TextDrawFont(TxtManual[i][7], 1);
- TextDrawSetProportional(TxtManual[i][7], 1);
- TxtManual[i][8] = TextDrawCreate(499.823577, 339.750183, "atuais.");
- TextDrawLetterSize(TxtManual[i][8], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][8], 1);
- TextDrawColor(TxtManual[i][8], -1);
- TextDrawSetShadow(TxtManual[i][8], 0);
- TextDrawSetOutline(TxtManual[i][8], 1);
- TextDrawBackgroundColor(TxtManual[i][8], 255);
- TextDrawFont(TxtManual[i][8], 1);
- TextDrawSetProportional(TxtManual[i][8], 1);
- TxtManual[i][9] = TextDrawCreate(487.999847, 356.082946, "hud:radar_triads");
- TextDrawLetterSize(TxtManual[i][9], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][9], 9.882339, 9.916671);
- TextDrawAlignment(TxtManual[i][9], 1);
- TextDrawColor(TxtManual[i][9], -1);
- TextDrawSetShadow(TxtManual[i][9], 0);
- TextDrawSetOutline(TxtManual[i][9], 0);
- TextDrawFont(TxtManual[i][9], 4);
- TxtManual[i][10] = TextDrawCreate(499.823577, 354.916809, "Informa quantidade de dardos");
- TextDrawLetterSize(TxtManual[i][10], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][10], 1);
- TextDrawColor(TxtManual[i][10], -1);
- TextDrawSetShadow(TxtManual[i][10], 0);
- TextDrawSetOutline(TxtManual[i][10], 1);
- TextDrawBackgroundColor(TxtManual[i][10], 255);
- TextDrawFont(TxtManual[i][10], 1);
- TextDrawSetProportional(TxtManual[i][10], 1);
- TxtManual[i][11] = TextDrawCreate(499.882415, 367.000335, "reservas.");
- TextDrawLetterSize(TxtManual[i][11], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][11], 1);
- TextDrawColor(TxtManual[i][11], -1);
- TextDrawSetShadow(TxtManual[i][11], 0);
- TextDrawSetOutline(TxtManual[i][11], 1);
- TextDrawBackgroundColor(TxtManual[i][11], 255);
- TextDrawFont(TxtManual[i][11], 1);
- TextDrawSetProportional(TxtManual[i][11], 1);
- TxtManual[i][12] = TextDrawCreate(489.882293, 383.833557, "LD_SPAC:white");
- TextDrawLetterSize(TxtManual[i][12], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][12], 6.117652, 9.333333);
- TextDrawAlignment(TxtManual[i][12], 1);
- TextDrawColor(TxtManual[i][12], 7077887);
- TextDrawSetShadow(TxtManual[i][12], 0);
- TextDrawSetOutline(TxtManual[i][12], 0);
- TextDrawFont(TxtManual[i][12], 4);
- TxtManual[i][13] = TextDrawCreate(499.882385, 381.583587, "Informa bateria restante.");
- TextDrawLetterSize(TxtManual[i][13], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][13], 1);
- TextDrawColor(TxtManual[i][13], -1);
- TextDrawSetShadow(TxtManual[i][13], 0);
- TextDrawSetOutline(TxtManual[i][13], 1);
- TextDrawBackgroundColor(TxtManual[i][13], 255);
- TextDrawFont(TxtManual[i][13], 1);
- TextDrawSetProportional(TxtManual[i][13], 1);
- TxtManual[i][14] = TextDrawCreate(499.941223, 394.250427, "20 disparos por pino.");
- TextDrawLetterSize(TxtManual[i][14], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][14], 1);
- TextDrawColor(TxtManual[i][14], -1);
- TextDrawSetShadow(TxtManual[i][14], 0);
- TextDrawSetOutline(TxtManual[i][14], 1);
- TextDrawBackgroundColor(TxtManual[i][14], 255);
- TextDrawFont(TxtManual[i][14], 1);
- TextDrawSetProportional(TxtManual[i][14], 1);
- TxtManual[i][15] = TextDrawCreate(490.058990, 408.833648, "Reload: Tecla ~y~Y~w~ - MAX: ~y~6 dardos");
- TextDrawLetterSize(TxtManual[i][15], 0.182705, 1.279166);
- TextDrawAlignment(TxtManual[i][15], 1);
- TextDrawColor(TxtManual[i][15], -1);
- TextDrawSetShadow(TxtManual[i][15], 0);
- TextDrawSetOutline(TxtManual[i][15], 1);
- TextDrawBackgroundColor(TxtManual[i][15], 255);
- TextDrawFont(TxtManual[i][15], 1);
- TextDrawSetProportional(TxtManual[i][15], 1);
- TxtManual[i][16] = TextDrawCreate(483.882446, 421.999969, "LD_SPAC:white");
- TextDrawLetterSize(TxtManual[i][16], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][16], 122.823577, 15.166655);
- TextDrawAlignment(TxtManual[i][16], 1);
- TextDrawColor(TxtManual[i][16], 8650751);
- TextDrawSetShadow(TxtManual[i][16], 0);
- TextDrawSetOutline(TxtManual[i][16], 0);
- TextDrawFont(TxtManual[i][16], 4);
- TxtManual[i][17] = TextDrawCreate(502.117156, 425.249847, "hud:radar_ammugun");
- TextDrawLetterSize(TxtManual[i][17], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][17], -8.941177, 8.166666);
- TextDrawAlignment(TxtManual[i][17], 1);
- TextDrawColor(TxtManual[i][17], -1);
- TextDrawSetShadow(TxtManual[i][17], 0);
- TextDrawSetOutline(TxtManual[i][17], 0);
- TextDrawFont(TxtManual[i][17], 4);
- TxtManual[i][18] = TextDrawCreate(588.293395, 425.083404, "hud:radar_ammugun");
- TextDrawLetterSize(TxtManual[i][18], 0.000000, 0.000000);
- TextDrawTextSize(TxtManual[i][18], 8.941176, 8.166666);
- TextDrawAlignment(TxtManual[i][18], 1);
- TextDrawColor(TxtManual[i][18], -1);
- TextDrawSetShadow(TxtManual[i][18], 0);
- TextDrawSetOutline(TxtManual[i][18], 0);
- TextDrawFont(TxtManual[i][18], 4);
- TxtManual[i][19] = TextDrawCreate(503.882293, 424.666961, "TASER International, Inc.");
- TextDrawLetterSize(TxtManual[i][19], 0.186470, 1.045831);
- TextDrawAlignment(TxtManual[i][19], 1);
- TextDrawColor(TxtManual[i][19], -1);
- TextDrawSetShadow(TxtManual[i][19], 0);
- TextDrawSetOutline(TxtManual[i][19], 1);
- TextDrawBackgroundColor(TxtManual[i][19], 255);
- TextDrawFont(TxtManual[i][19], 3);
- TextDrawSetProportional(TxtManual[i][19], 1);
- }
- return 1;
- }
- public OnGameModeExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PrimeiroSpawn[playerid] = true;
- new arqtaser[40], arqdata[40];
- format(arqtaser, sizeof(arqtaser), "/Tasers/%s.ini", Nome(playerid));
- if(DOF2_FileExists(arqtaser))
- {
- PrimeiroSpawn[playerid] = true;
- TaserInfo[playerid][Taser] = DOF2_GetBool(arqtaser, "taser");
- TaserInfo[playerid][TaserEmMaos] = DOF2_GetBool(arqtaser, "em_maos");
- TaserInfo[playerid][Dardos] = DOF2_GetInt(arqtaser, "dardos");
- TaserInfo[playerid][DardosR] = DOF2_GetInt(arqtaser, "dardos_reserva");
- TaserInfo[playerid][Bateria] = DOF2_GetInt(arqtaser, "bateria");
- }
- else
- {
- DOF2_CreateFile(arqtaser);
- DOF2_SetBool(arqtaser, "taser", false);
- DOF2_SetBool(arqtaser, "em_maos", false);
- DOF2_SetInt(arqtaser, "dardos", 0);
- DOF2_SetInt(arqtaser, "dardos_reserva", 0);
- DOF2_SetInt(arqtaser, "bateria", 0);
- }
- format(arqdata, sizeof(arqdata), "/DataPort/%s.ini", Nome(playerid));
- new chave[7];
- if(!DOF2_FileExists(arqdata))
- {
- DOF2_CreateFile(arqdata);
- for(new i = 0; i < 10; i++)
- {
- format(chave, sizeof(chave), "Save%d", i+1);
- DOF2_SetString(arqdata, chave, "N/A");
- DataPort[playerid][i] = "N/A";
- }
- DOF2_SetInt(arqdata, "UltimoDel", -1);
- DOF2_SetInt(arqdata, "UltimoSave", -1);
- DataPortDel[playerid] = 0;
- UltimoSave[playerid] = 0;
- }
- else
- {
- new saves[22];
- for(new i; i < 10; i++)
- {
- format(chave, sizeof(chave), "Save%d", i+1);
- format(saves, sizeof(saves), "%s", DOF2_GetString(arqdata, chave));
- DataPort[playerid][i] = saves;
- }
- DataPortDel[playerid] = DOF2_GetInt(arqdata, "UltimoDel");
- UltimoSave[playerid] = DOF2_GetInt(arqdata, "UltimoSave");
- }
- DOF2_SaveFile();
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new arqtaser[40], arqdata[40];
- format(arqtaser, sizeof(arqtaser), "/Tasers/%s.ini", Nome(playerid));
- if(DOF2_FileExists(arqtaser))
- {
- new Arma, Balas;
- GetPlayerWeaponData(playerid, 2, Arma, Balas);
- DOF2_SetBool(arqtaser, "taser", TaserInfo[playerid][Taser]);
- DOF2_SetBool(arqtaser, "em_maos", TaserInfo[playerid][TaserEmMaos]);
- if(Arma == 23) DOF2_SetInt(arqtaser, "dardos", Balas);
- else DOF2_SetInt(arqtaser, "dardos", 0);
- DOF2_SetInt(arqtaser, "dardos_reserva", TaserInfo[playerid][DardosR]);
- DOF2_SetInt(arqtaser, "bateria", TaserInfo[playerid][Bateria]);
- }
- format(arqdata, sizeof(arqdata), "/DataPort/%s.ini", Nome(playerid));
- new chave[10];
- if(DOF2_FileExists(arqdata))
- {
- DOF2_CreateFile(arqdata);
- for(new i; i < 10; i++)
- {
- format(chave, sizeof(chave), "Save%d", i+1);
- DOF2_SetString(arqdata, chave, DataPort[playerid][i]);
- }
- DOF2_SetInt(arqdata, "UltimoDel", DataPortDel[playerid]);
- DOF2_SetInt(arqdata, "UltimoSave", UltimoSave[playerid]);
- }
- DOF2_SaveFile();
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(PrimeiroSpawn[playerid])
- {
- PreloadAnims(playerid);
- if(TaserInfo[playerid][TaserEmMaos] && TaserInfo[playerid][Dardos] > 0)
- {
- PrimeiroSpawn[playerid] = false;
- GiveTaser(playerid, TaserInfo[playerid][Dardos]);
- ATTaser(playerid, 2);
- ATBateria(playerid);
- }
- else if(TaserInfo[playerid][TaserEmMaos]) TaserInfo[playerid][TaserEmMaos] = false;
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_SECONDARY_ATTACK)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1368.6152,-1279.6919,13.5469))
- {
- SetPlayerPos(playerid, 316.3154,-170.2835,999.5938);
- SetPlayerInterior(playerid, 6);
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 316.3154,-170.2835,999.5938))
- {
- SetPlayerPos(playerid, 1368.6152,-1279.6919,13.5469);
- SetPlayerInterior(playerid, 0);
- }
- }
- if(newkeys & KEY_NO && InManual[playerid])
- {
- for(new a; a < 20; a++) TextDrawHideForPlayer(playerid, TxtManual[playerid][a]);
- InManual[playerid] = false;
- }
- if(newkeys & KEY_YES && TaserInfo[playerid][TaserEmMaos] && GetPlayerWeapon(playerid) == 23)//Pegar munição taser
- {
- if(TaserInfo[playerid][DardosR] < 1) return 1;
- if(GetPlayerAmmo(playerid) >= 6) return 1;
- if(GetPlayerAmmo(playerid) < 6)
- {
- if(TempoReload[playerid] > GetTickCount()) return 1;
- if(newkeys & KEY_HANDBRAKE == KEY_HANDBRAKE && oldkeys & KEY_HANDBRAKE) return 1;
- ApplyAnimation(playerid, "COLT45", "colt45_reload", 4.1, 0, 1, 1, 1, 1, 1);
- GiveTaser(playerid, 1);
- TaserInfo[playerid][Dardos]++;
- TaserInfo[playerid][DardosR] --;
- SetTimerEx("ReloadTaser", 800, false, "i", playerid);
- TempoReload[playerid] = GetTickCount() + 1000;
- ATTaser(playerid, 2);
- ATBateria(playerid);
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case D_COMPRA:
- {
- if(!response) return 1;
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, D_COMPRA+1, DIALOG_STYLE_MSGBOX, "Comprar Item", "{FFFF00}Produto: {FFFFFF}Taser\n{FFFF00}Dardos: {FFFFFF}20\n{FFFF00}Bateria: {FFFFFF}120\n{FFFF00}Valor: {00FF40}R$ 1000", "Comprar", "Cancelar");
- case 1: ShowPlayerDialog(playerid, D_COMPRA+2, DIALOG_STYLE_MSGBOX, "Comprar Item", "{FFFF00}Produto: {FFFFFF}Bateria\n{FFFF00}Carga: {FFFFFF}100%\n{FFFF00}Valor: {00FF40}R$ 250", "Comprar", "Cancelar");
- case 2: ShowPlayerDialog(playerid, D_COMPRA+3, DIALOG_STYLE_MSGBOX, "Comprar Item", "{FFFF00}Produto: {FFFFFF}Dardos\n{FFFF00}Quantia: {FFFFFF}10\n{FFFF00}Valor: {00FF40}R$ 600", "Comprar", "Cancelar");
- }
- }
- case D_COMPRA+1:
- {
- if(!response) return 1;
- if(TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "ERRO: Você já possui um taser!");
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "ERRO: Você não possui dinheiro suficiente");
- GiveTaser(playerid, 6, true);
- TaserInfo[playerid][DardosR] = 14;
- TaserInfo[playerid][Bateria] = 120;
- SendClientMessage(playerid, 0x00FF40AA, "Parabéns pela sua compra! Use: /manual");
- }
- case D_COMPRA+2:
- {
- if(!response) return 1;
- if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "ERRO: Você não possui um taser!");
- if(TaserInfo[playerid][Bateria] >= 120) return SendClientMessage(playerid, -1, "ERRO: Sua bateria está cheia!");
- if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, -1, "ERRO: Você não possui dinheiro suficiente");
- TaserInfo[playerid][Bateria] = 120;
- ATBateria(playerid);
- SendClientMessage(playerid, 0x00FF40AA, "Parabéns pela sua compra! Bateria renovada");
- }
- case D_COMPRA+3:
- {
- if(!response) return 1;
- if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser!");
- if(TaserInfo[playerid][DardosR] >= 50 || TaserInfo[playerid][DardosR]+10 >= 50) return SendClientMessage(playerid, -1, "Você não pode mais guardar dardos com você");
- if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, "Você não possui dinheiro suficiente");
- TaserInfo[playerid][DardosR] += 10;
- ATTaser(playerid, 2);
- SendClientMessage(playerid, 0x00FF40AA, "Parabéns pela sua compra! +10 dardos");
- }
- }
- return 1;
- }
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if(TaserInfo[playerid][TaserEmMaos] == true && weaponid == 23)
- {
- new Ano, Mes, Dia, Hora, Min, Seg, data[22], bool:saved;
- SetPlayerAttachedObject(playerid, 5, 18717, 6, -1.274216, 0.031086, -0.154675, 359.692840, 79.821006, 0.000000, 1.000000, 1.000000, 1.000000); // prt_spark - Efeito do dardo taser
- SetTimerEx("RemoveAttach", 400, false, "ii", playerid, 5);
- TaserInfo[playerid][Dardos] = GetPlayerAmmo(playerid)-1;
- if(TaserInfo[playerid][Dardos] == 0) TaserInfo[playerid][TaserEmMaos] = false;
- getdate(Ano, Mes, Dia); gettime(Hora, Min, Seg);
- format(data, sizeof(data), "%02d/%02d/%d - %02d:%02d:%02d", Dia, Mes, Ano, Hora, Min, Seg);
- for(new i; i < 10; i++)
- {
- if(!strcmp(DataPort[playerid][i], "N/A"))
- {
- DataPort[playerid][i] = data;
- UltimoSave[playerid] = i;
- saved = true;
- break;
- }
- }
- if(!saved)
- {
- new ultimo = DataPortDel[playerid];
- if(ultimo == 9) ultimo = -1;
- DataPortDel[playerid] = ultimo+1;
- DataPort[playerid][ultimo+1] = data;
- UltimoSave[playerid] = ultimo+1;
- }
- TaserInfo[playerid][Bateria]--;
- ATBateria(playerid);
- ATTaser(playerid, 2);
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- ATTaser(playerid, 1);
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
- {
- GetPlayerHealth(damagedid, lifep[damagedid]);
- GetPlayerArmour(damagedid, coletep[damagedid]);
- if(TaserInfo[playerid][TaserEmMaos] && weaponid == 23)
- {
- SetPlayerHealth(damagedid, lifep[damagedid]); SetPlayerArmour(damagedid, coletep[damagedid]);
- if(AtingidoTaser[damagedid]) return 1;
- AtingidoTaser[damagedid] = true;
- TogglePlayerControllable(damagedid, false);
- new rand = random(2);
- if(rand == 0) ApplyAnimation(damagedid, "KNIFE", "knife_hit_3", 4.1, 0, 1, 1, 1, 1, 1);
- if(rand == 1) ApplyAnimation(damagedid, "CRACK", "crckdeth1", 4.1, 0, 1, 1, 1, 1, 1);
- SetTimerEx("StopTaser", 10000, false, "i", damagedid);
- }
- return 1;
- }
- //================== MY CALLBACK'S
- public StopTaser(playerid)
- {
- TogglePlayerControllable(playerid, true);
- AtingidoTaser[playerid] = false;
- ApplyAnimation(playerid, "Attractors", "Stepsit_out", 4.1, 0, 1, 1, 1, 1, 1); //levantar chão
- SetTimerEx("StopAnim", 800, false, "i", playerid);
- }
- public StopAnim(playerid) return ApplyAnimation(playerid, "BD_FIRE", "BD_Fire1", 4.1, 0, 1, 1, 1, 1, 1);
- public RemoveAttach(playerid, slot)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, slot)) RemovePlayerAttachedObject(playerid, slot);
- return 1;
- }
- public ReloadTaser(playerid)
- {
- ApplyAnimation(playerid, "BD_FIRE", "BD_Fire1", 4.1, 0, 1, 1, 1, 1, 1);
- }
- public ATTaser(playerid, type)
- {
- switch(type)
- {
- case 1:
- {
- if(AtualizouTaser[playerid] && !TaserInfo[playerid][TaserEmMaos])
- {
- for(new a; a < sizeof(TxtTaser); a++) TextDrawHideForPlayer(playerid, TxtTaser[playerid][a]);
- AtualizouTaser[playerid] = false;
- return 1;
- }
- if(GetPlayerWeapon(playerid) != 23 && TaserInfo[playerid][TaserEmMaos] && !SemTaserEmMaos[playerid])
- {
- SemTaserEmMaos[playerid] = true;
- for(new a; a < 16; a++) TextDrawHideForPlayer(playerid, TxtTaser[playerid][a]);
- }
- else if(GetPlayerWeapon(playerid) == 23 && TaserInfo[playerid][TaserEmMaos] && SemTaserEmMaos[playerid])
- {
- SemTaserEmMaos[playerid] = false;
- for(new a; a < 16; a++) TextDrawShowForPlayer(playerid, TxtTaser[playerid][a]);
- }
- }
- case 2:
- {
- if(!TaserInfo[playerid][TaserEmMaos]) return 1;
- AtualizouTaser[playerid] = true;
- new str[11];
- format(str, sizeof(str), "%s", DataPort[playerid][UltimoSave[playerid]]);
- TextDrawSetString(TxtTaser[playerid][4], str);
- format(str, sizeof(str), "%d DARDOS", TaserInfo[playerid][Dardos]);
- TextDrawSetString(TxtTaser[playerid][6], str);
- format(str, sizeof(str), "%d RESERVA", TaserInfo[playerid][DardosR]);
- TextDrawSetString(TxtTaser[playerid][8], str);
- }
- }
- return 1;
- }
- public ATBateria(playerid)
- {
- new bateria = TaserInfo[playerid][Bateria];
- if(bateria > 100) for(new i = 10; i < 16; i++) TextDrawColor(TxtTaser[playerid][i], 8781823);
- else if(bateria < 100 && bateria > 80) TextDrawColor(TxtTaser[playerid][15], 0xFFFFFF00);
- else if(bateria < 80 && bateria > 60) RemovePino(playerid, 14), TextDrawColor(TxtTaser[playerid][14], 0xFFFFFF00);
- else if(bateria < 60 && bateria > 40) RemovePino(playerid, 13), TextDrawColor(TxtTaser[playerid][13], 0xFFFFFF00);
- else if(bateria < 40 && bateria > 20) RemovePino(playerid, 12), TextDrawColor(TxtTaser[playerid][12], 0xFFFFFF00);
- else if(bateria < 20 && bateria > 5) RemovePino(playerid, 11), TextDrawColor(TxtTaser[playerid][11], 0xFFFFFF00);
- else if(bateria < 5 && bateria > 0) RemovePino(playerid, 10), TextDrawColor(TxtTaser[playerid][10], 0xD62222FF);
- else if(bateria < 1)
- {
- RemovePino(playerid, 10);
- TextDrawColor(TxtTaser[playerid][10], 0xFFFFFF00);
- RemovePlayerWeapon(playerid, 23);
- TaserInfo[playerid][TaserEmMaos] = false;
- SendClientMessage(playerid, -1, "A bateria de seu taser terminou, adquira uma nova");
- PlayerPlaySound(playerid, 1085, 0, 0, 0);
- }
- if(TaserInfo[playerid][TaserEmMaos] && !SemTaserEmMaos[playerid]) for(new i = 10; i < 16; i++) TextDrawShowForPlayer(playerid, TxtTaser[playerid][i]);
- return 1;
- }
- //================== MY STOCK'S
- stock RemovePino(playerid, id)
- {
- for(new i = 10; i < 16; i++)
- {
- if(i < id+1) continue;//i < id ou i == id pula linha baixo
- TextDrawColor(TxtTaser[playerid][i], 0xFFFFFF00);
- }
- return 1;
- }
- stock GiveTaser(playerid, ammo, var = false)
- {
- if(ammo < 0) return 0;
- GivePlayerWeapon(playerid, 23, ammo);
- if(var) TaserInfo[playerid][Taser] = true;
- return 1;
- }
- stock PreloadAnims(playerid)//Anti bug animes :D
- {
- ApplyAnimation(playerid, "AIRPORT", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "Attractors", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BAR", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BASEBALL", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BD_FIRE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BEACH", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "benchpress", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BF_injection", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BIKED", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BIKEH", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BIKELEAP", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BIKES", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BIKEV", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BIKE_DBZ", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BMX", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOX", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BSKTBALL", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BUDDY", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BUS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CAMERA", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CAR", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CARRY", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CAR_CHAT", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CASINO", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CHAINSAW", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CHOPPA", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CLOTHES", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "COACH", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "COLT45", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "COP_AMBIENT", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "COP_DVBYZ", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CRACK", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "CRIB", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DAM_JUMP", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DANCING", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DEALER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DILDO", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DODGE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DOZER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "DRIVEBYS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FAT", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FIGHT_B", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FIGHT_C", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FIGHT_D", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FIGHT_E", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FINALE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FINALE2", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FLAME", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "Flowers", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "FOOD", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "Freeweights", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GANGS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GHANDS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GHETTO_DB", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "goggles", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GRAFFITI", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GRAVEYARD", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GRENADE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "GYMNASIUM", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "HAIRCUTS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "HEIST9", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "INT_HOUSE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "INT_OFFICE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "INT_SHOP", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "JST_BUISNESS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "KART", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "KISSING", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "KNIFE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "LAPDAN1", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "LAPDAN2", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "LAPDAN3", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "LOWRIDER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "MD_CHASE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "MD_END", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "MEDIC", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "MISC", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "MTB", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "MUSCULAR", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "NEVADA", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "ON_LOOKERS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "OTB", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "PARACHUTE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "PARK", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "PAULNMAC", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "ped", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "PLAYER_DVBYS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "PLAYIDLES", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "POLICE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "POOL", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "POOR", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "PYTHON", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "QUAD", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "QUAD_DBZ", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "RAPPING", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "RIFLE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "RIOT", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "ROB_BANK", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "RUSTLER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "RYDER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SCRATCHING", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SHAMAL", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SHOP", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SHOTGUN", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SILENCED", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SKATE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SMOKING", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SNIPER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SPRAYCAN", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "STRIP", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SUNBATHE", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SWAT", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SWEET", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SWIM", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "SWORD", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "TANK", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "TATTOOS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "TEC", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "TRAIN", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "TRUCK", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "UZI", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "VAN", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "VENDING", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "VORTEX", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "WAYFARER", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "WEAPONS", "null", 0.0, 0, 0, 0, 0, 0);
- ApplyAnimation(playerid, "WUZI", "null", 0.0, 0, 0, 0, 0, 0);
- return 1;
- }
- stock Nome(playerid)
- {
- new nj[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nj, sizeof(nj));
- return nj;
- }
- stock RemovePlayerWeapon(playerid, weaponid)
- {
- new pWeaponData[13][2];
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, pWeaponData[i][0], pWeaponData[i][1]);
- }
- ResetPlayerWeapons(playerid);
- for(new i; i < 13; i++)
- {
- if(pWeaponData[i][0] != 0 && pWeaponData[i][0] != weaponid)
- {
- GivePlayerWeapon(playerid, pWeaponData[i][0], pWeaponData[i][1]);
- }
- }
- return 1;
- }
- //================== MY COMMANDS
- CMD:taser(playerid)
- {
- if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser!");
- if(TaserInfo[playerid][TaserEmMaos])
- {
- new Arma, Balas;
- GetPlayerWeaponData(playerid, 2, Arma, Balas);
- TaserInfo[playerid][DardosR] += Balas;
- RemovePlayerWeapon(playerid, 23);
- TaserInfo[playerid][TaserEmMaos] = false;
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Você não pode pegar seu taser em um veículo!");
- if(TaserInfo[playerid][DardosR] < 1) return SendClientMessage(playerid, -1, "Você não possui dardos suficientes para equipar seu taser!");
- if(TaserInfo[playerid][Bateria] < 1) return SendClientMessage(playerid, -1, "Seu taser está sem bateria, compre uma nova!");
- TaserInfo[playerid][TaserEmMaos] = true;
- new dardos = TaserInfo[playerid][DardosR];
- if(dardos > 6)
- {
- GiveTaser(playerid, 6);
- TaserInfo[playerid][DardosR] -= 6;
- TaserInfo[playerid][Dardos] = 6;
- }
- else
- {
- GiveTaser(playerid, dardos);
- TaserInfo[playerid][DardosR] -= dardos;
- TaserInfo[playerid][Dardos] = dardos;
- }
- ATBateria(playerid);
- ATTaser(playerid, 2);
- for(new a; a < sizeof(TxtTaser); a++) TextDrawShowForPlayer(playerid, TxtTaser[playerid][a]);
- return 1;
- }
- CMD:dartaser(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Você não pode usar esse comando!");
- new id, bb, bat;
- if(sscanf(params,"udd", id, bb, bat)) return SendClientMessage(playerid, -1, "Use: /dartaser [id] [dardos] [bateria]");
- TaserInfo[id][Taser] = true;
- TaserInfo[playerid][DardosR] = bb;
- TaserInfo[playerid][Bateria] = bat;
- SendFormatMsg(id, 0x00FF40FF, "%s lhe deu um taser [Dardos: %d | Bateria: %d]", Nome(playerid), bb, bat);
- SendFormatMsg(playerid, -1, "Você deu um taser para %s [Dardos: %d | Bateria: %d]", Nome(id), bb, bat);
- return 1;
- }
- CMD:dataport(playerid)
- {
- if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser para acessar seus dados!");
- new str[70], final[500];
- for(new i; i < 10; i++)
- {
- format(str, sizeof(str), "{FFFFFF}Data %d - %s\n", i, DataPort[playerid][i]);
- strcat(final, str);
- }
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Dataport", final, "Confirma", "");
- return 1;
- }
- CMD:manual(playerid)
- {
- if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser!");
- if(InManual[playerid])
- {
- for(new a; a < 20; a++) TextDrawHideForPlayer(playerid, TxtManual[playerid][a]);
- InManual[playerid] = false;
- return 1;
- }
- InManual[playerid] = true;
- SendClientMessage(playerid, -1, "Para guardar seu manual, tecle N");
- for(new a; a < 20; a++) TextDrawShowForPlayer(playerid, TxtManual[playerid][a]);
- return 1;
- }
- CMD:comprar(playerid)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, 312.3958, -166.1394, 999.6010)) return SendClientMessage(playerid, -1, "Você não está na loja de armas ou próximo ao balcão!");
- ShowPlayerDialog(playerid, D_COMPRA, DIALOG_STYLE_LIST, "Loja de armas", "Taser\t\t{00FF40}R$ 1000{FFFFFF}\nBateria\t\t{00FF40}R$ 250{FFFFFF}\nDardos\t\t{00FF40}R$ 600", "Selecionar", "Sair");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement