Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* INCLUDES */
- #include <a_samp>
- #include <ZCMD>
- #include <DOF2>
- /* DEFINES */
- /* Cores */
- #define AzulClaro 0x1E90FFFF
- #define AzulCiano 0x00FFFFFF
- #define VerdeClaro 0x00FA9AFF
- #define Amarelo 0xFFFF00FF
- #define Vermelho 0xFF0000FF
- /* Dialogs */
- #define DIALOG_CERTEZA 1
- #define DIALOG_ESCOLHERARMA 2
- /* Outros */
- #define File "gDamage/%s.txt"
- #define TAMANHO_OBJETO 0.4
- /* OUTROS */
- enum pInfo
- {
- gPower, //DESATIVADA POR MOMENTO (ATÉ A PRÓXIMA ATUALIZAÇÃO)
- gHabilidade9mm,
- gHabilidadeSilenced,
- gHabilidadeEagle,
- gHabilidadeShotgun,
- gHabilidadeSawnoff,
- gHabilidadeCombatShotgun,
- gHabilidadeUzi,
- gHabilidadeMP5,
- gHabilidadeAK47,
- gHabilidadeM4,
- gHabilidadeTec9,
- gHabilidadeCountryRifle, //DESATIVADA POR MOMENTO (ATÉ A PRÓXIMA ATUALIZAÇÃO)
- gHabilidadeSniperRifle, //DESATIVADA POR MOMENTO (ATÉ A PRÓXIMA ATUALIZAÇÃO)
- //
- gSkill9mm,
- gSkillSawnoff,
- gSkillUzi
- }
- /* NEW'S */
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new pAvisado[MAX_PLAYERS] = 0;
- new Float:X_OBJETO = 2805.8999000;
- new Float:Y_OBJETO = -2337.0000000;
- new bool:QuerendoTreinar[MAX_PLAYERS];
- new bool:pAtirou[MAX_PLAYERS];
- new bool:pTreinando[MAX_PLAYERS];
- /* FORWARDS */
- forward Liberar(playerid);
- /* PUBLICS */
- public Liberar(playerid)
- {
- pAtirou[playerid] = false;
- pAvisado[playerid] = 0;
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" gDamage");
- print("--------------------------------------\n");
- CreateObject(3025,2805.8999000,-2337.0000000,16.2000000,0.0000000,0.0000000,270.0000000); //object(target_frame) (2)
- CreateObject(2619,2805.8000500,-2337.0000000,15.5000000,0.0000000,0.0000000,0.0000000); //object(mp_ammoambient) (2)
- return 1;
- }
- public OnFilterScriptExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new Salvamento[24];
- format(Salvamento, 24, File, GetPlayerNameEx(playerid));
- //
- if(!DOF2_FileExists(Salvamento))
- {
- DOF2_CreateFile(Salvamento);
- DOF2_SetInt(Salvamento, "Força", 0);
- DOF2_SetInt(Salvamento, "Habilidade 9mm", 0);
- DOF2_SetInt(Salvamento, "Habilidade Silenciada", 0);
- DOF2_SetInt(Salvamento, "Habilidade Eagle", 0);
- DOF2_SetInt(Salvamento, "Habilidade Shotgun", 0);
- DOF2_SetInt(Salvamento, "Habilidade Sawnoff", 0);
- DOF2_SetInt(Salvamento, "Habilidade Combat Shotgun", 0);
- DOF2_SetInt(Salvamento, "Habilidade Uzi", 0);
- DOF2_SetInt(Salvamento, "Habilidade MP5", 0);
- DOF2_SetInt(Salvamento, "Habilidade AK-47", 0);
- DOF2_SetInt(Salvamento, "Habilidade M4", 0);
- DOF2_SetInt(Salvamento, "Habilidade Tec-9", 0);
- DOF2_SetInt(Salvamento, "Habilidade Country Rifle", 0);
- DOF2_SetInt(Salvamento, "Habilidade Sniper Rifle", 0);
- //
- // O Nível de cada arma vai de 0 a 999 (começando a partir do 0) e é aumentado cada vez que o Player matar usando aquela arma.
- DOF2_SetInt(Salvamento, "Skill 9mm", 0);
- DOF2_SetInt(Salvamento, "Skill Sawnoff", 0);
- DOF2_SetInt(Salvamento, "Skill Uzi", 0);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
- DOF2_SaveFile();
- }
- PlayerInfo[playerid][gPower] = DOF2_GetInt(Salvamento, "Força");
- PlayerInfo[playerid][gHabilidade9mm] = DOF2_GetInt(Salvamento, "Habilidade 9mm");
- PlayerInfo[playerid][gHabilidadeEagle] = DOF2_GetInt(Salvamento, "Habilidade Eagle");
- PlayerInfo[playerid][gHabilidadeShotgun] = DOF2_GetInt(Salvamento, "Habilidade Shotgun");
- PlayerInfo[playerid][gHabilidadeSilenced] = DOF2_GetInt(Salvamento, "Habilidade Silenciada");
- PlayerInfo[playerid][gHabilidadeSawnoff] = DOF2_GetInt(Salvamento, "Habilidade Sawnoff");
- PlayerInfo[playerid][gHabilidadeCombatShotgun] = DOF2_GetInt(Salvamento, "Habilidade Combat Shotgun");
- PlayerInfo[playerid][gHabilidadeUzi] = DOF2_GetInt(Salvamento, "Habilidade Uzi");
- PlayerInfo[playerid][gHabilidadeMP5] = DOF2_GetInt(Salvamento, "Habilidade MP5");
- PlayerInfo[playerid][gHabilidadeAK47] = DOF2_GetInt(Salvamento, "Habilidade AK-47");
- PlayerInfo[playerid][gHabilidadeM4] = DOF2_GetInt(Salvamento, "Habilidade M4");
- PlayerInfo[playerid][gHabilidadeTec9] = DOF2_GetInt(Salvamento, "Habilidade Tec-9");
- PlayerInfo[playerid][gHabilidadeCountryRifle] = DOF2_GetInt(Salvamento, "Habilidade Country Rifle");
- PlayerInfo[playerid][gHabilidadeSniperRifle] = DOF2_GetInt(Salvamento, "Habilidade Sniper Rifle");
- //
- PlayerInfo[playerid][gSkill9mm] = DOF2_GetInt(Salvamento, "Skill 9mm");
- PlayerInfo[playerid][gSkillSawnoff] = DOF2_GetInt(Salvamento, "Skill Sawnoff");
- PlayerInfo[playerid][gSkillUzi] = DOF2_GetInt(Salvamento, "Skill Uzi");
- //
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, PlayerInfo[playerid][gSkill9mm]);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, PlayerInfo[playerid][gSkillSawnoff]);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, PlayerInfo[playerid][gSkillUzi]);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new Salvamento[24];
- format(Salvamento, 24, File, GetPlayerNameEx(playerid));
- //
- if(!DOF2_FileExists(Salvamento))
- {
- DOF2_CreateFile(Salvamento);
- }
- //
- DOF2_SetInt(Salvamento, "Força", gPower);
- DOF2_SetInt(Salvamento, "Habilidade 9mm", PlayerInfo[playerid][gHabilidade9mm]);
- DOF2_SetInt(Salvamento, "Habilidade Silenciada", PlayerInfo[playerid][gHabilidadeSilenced]);
- DOF2_SetInt(Salvamento, "Habilidade Eagle", PlayerInfo[playerid][gHabilidadeEagle]);
- DOF2_SetInt(Salvamento, "Habilidade Shotgun", PlayerInfo[playerid][gHabilidadeShotgun]);
- DOF2_SetInt(Salvamento, "Habilidade Sawnoff", PlayerInfo[playerid][gHabilidadeSawnoff]);
- DOF2_SetInt(Salvamento, "Habilidade Combat Shotgun", PlayerInfo[playerid][gHabilidadeCombatShotgun]);
- DOF2_SetInt(Salvamento, "Habilidade Uzi", PlayerInfo[playerid][gHabilidadeUzi]);
- DOF2_SetInt(Salvamento, "Habilidade MP5", PlayerInfo[playerid][gHabilidadeMP5]);
- DOF2_SetInt(Salvamento, "Habilidade AK-47", PlayerInfo[playerid][gHabilidadeAK47]);
- DOF2_SetInt(Salvamento, "Habilidade M4", PlayerInfo[playerid][gHabilidadeM4]);
- DOF2_SetInt(Salvamento, "Habilidade Tec-9", PlayerInfo[playerid][gHabilidadeTec9]);
- DOF2_SetInt(Salvamento, "Habilidade Country Rifle", PlayerInfo[playerid][gHabilidadeCountryRifle]);
- DOF2_SetInt(Salvamento, "Habilidade Sniper Rifle", PlayerInfo[playerid][gHabilidadeSniperRifle]);
- //
- DOF2_SetInt(Salvamento, "Skill 9mm", PlayerInfo[playerid][gSkill9mm]);
- DOF2_SetInt(Salvamento, "Skill Sawnoff", PlayerInfo[playerid][gSkillSawnoff]);
- DOF2_SetInt(Salvamento, "Skill Uzi", PlayerInfo[playerid][gSkillUzi]);
- DOF2_SaveFile();
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(killerid != INVALID_PLAYER_ID)
- {
- if(reason == 22)
- {
- PlayerInfo[killerid][gSkill9mm]++;
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, PlayerInfo[playerid][gSkill9mm]);
- }
- if(reason == 26)
- {
- PlayerInfo[killerid][gSkillSawnoff]++;
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, PlayerInfo[playerid][gSkillSawnoff]);
- }
- if(reason == 28)
- {
- PlayerInfo[killerid][gSkillUzi]++;
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, PlayerInfo[playerid][gSkillUzi]);
- }
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(pTreinando[playerid] == true)
- {
- SendClientMessage(playerid, Vermelho, "Achei que você estivesse treinando ? ¬¬'");
- SetPlayerPos(playerid, 2613.8999000, -2382.3000500, 13.3000000);
- PlayerPlaySound(playerid, 1150, 2613.8999000, -2382.3000500, 13.3000000);
- pAtirou[playerid] = false;
- pTreinando[playerid] = false;
- pAvisado[playerid] = 0;
- }
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- if(pTreinando[playerid] == true)
- {
- SendClientMessage(playerid, Vermelho, "Achei que você estivesse treinando ? ¬¬'");
- SetPlayerPos(playerid, 2613.8999000, -2382.3000500, 13.3000000);
- PlayerPlaySound(playerid, 1150, 2613.8999000, -2382.3000500, 13.3000000);
- SetPlayerInterior(playerid, 0);
- pAtirou[playerid] = false;
- pTreinando[playerid] = false;
- pAvisado[playerid] = 0;
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if((newkeys & KEY_FIRE && oldkeys != KEY_FIRE ) && IsPlayerInRangeOfPoint(playerid, 200.0 , X_OBJETO , Y_OBJETO , 0.0))
- {
- if(pTreinando[playerid] == true)
- {
- if(pAtirou[playerid] == true)
- {
- pAvisado[playerid]++;
- SendClientMessage(playerid, Vermelho, "Você também não pode só ficar parado apertando ' Fire ' né ? ¬¬'");
- }
- if(pAvisado[playerid] == 5)
- {
- SetPlayerPos(playerid, 2613.8999000, -2382.3000500, 13.3000000);
- PlayerPlaySound(playerid, 1150, 2613.8999000, -2382.3000500, 13.3000000);
- SendClientMessage(playerid, AzulCiano, "Seu treino foi cancelado por desobedecer o Server '-'.");
- SetPlayerVirtualWorld(playerid, 0);
- pAtirou[playerid] = false;
- pTreinando[playerid] = false;
- pAvisado[playerid] = 0;
- }
- if(pAtirou[playerid] == false)
- {
- static
- Float:xPos,
- Float:yPos,
- Float:zPos,
- Float:distancia,
- Float:aPos;
- GetPlayerPos(playerid, xPos, yPos, zPos);
- GetPlayerFacingAngle(playerid, aPos);
- distancia = floatsqroot(floatpower(floatabs(xPos-X_OBJETO), 2) + floatpower(floatabs(yPos-Y_OBJETO), 2));
- if(distancia < 30.0) return SendClientMessage(playerid, Vermelho, "Atirando tão de perto suas habilidades não vão melhorar ¬¬'");
- if(distancia < 100.0)
- {
- xPos += (distancia * floatsin(-aPos, degrees)),
- yPos += (distancia * floatcos(-aPos, degrees));
- distancia = floatsqroot(floatpower(floatabs(xPos-X_OBJETO), 2) + floatpower(floatabs(yPos-Y_OBJETO), 2));
- }
- if(TAMANHO_OBJETO > distancia)
- {
- new Arma = GetPlayerWeapon(playerid);
- if(Arma == 22) PlayerInfo[playerid][gHabilidade9mm]++;
- if(Arma == 23) PlayerInfo[playerid][gHabilidadeSilenced]++;
- if(Arma == 24) PlayerInfo[playerid][gHabilidadeEagle]++;
- if(Arma == 25) PlayerInfo[playerid][gHabilidadeShotgun]++;
- if(Arma == 26) PlayerInfo[playerid][gHabilidadeSawnoff]++;
- if(Arma == 27) PlayerInfo[playerid][gHabilidadeCombatShotgun]++;
- if(Arma == 28) PlayerInfo[playerid][gHabilidadeUzi]++;
- if(Arma == 29) PlayerInfo[playerid][gHabilidadeMP5]++;
- if(Arma == 30) PlayerInfo[playerid][gHabilidadeAK47]++;
- if(Arma == 31) PlayerInfo[playerid][gHabilidadeM4]++;
- if(Arma == 32) PlayerInfo[playerid][gHabilidadeTec9]++;
- SendClientMessage(playerid, VerdeClaro, "Você acertou o objeto.");
- SetTimerEx("Liberar", 3000, false, "i", playerid);
- pAtirou[playerid] = true;
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID)
- {
- if(weaponid == 22)
- {
- if(PlayerInfo[issuerid][gHabilidade9mm] <= 200)
- {
- amount = 1;
- }
- if(PlayerInfo[issuerid][gHabilidade9mm] >= 201 && PlayerInfo[issuerid][gHabilidade9mm] <= 400)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidade9mm] >= 401 && PlayerInfo[issuerid][gHabilidade9mm] <= 600)
- {
- amount = 3;
- }
- if(PlayerInfo[issuerid][gHabilidade9mm] > 600)
- {
- amount = 5;
- }
- }
- if(weaponid == 23)
- {
- if(PlayerInfo[issuerid][gHabilidadeSilenced] <= 200)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeSilenced] >= 201 && PlayerInfo[issuerid][gHabilidadeSilenced] <= 400)
- {
- amount = 3;
- }
- if(PlayerInfo[issuerid][gHabilidadeSilenced] >= 401 && PlayerInfo[issuerid][gHabilidadeSilenced] <= 600)
- {
- amount = 4;
- }
- if(PlayerInfo[issuerid][gHabilidadeSilenced] > 600)
- {
- amount = 5;
- }
- }
- if(weaponid == 24)
- {
- if(PlayerInfo[issuerid][gHabilidadeEagle] <= 200)
- {
- amount = 32;
- }
- if(PlayerInfo[issuerid][gHabilidadeEagle] >= 201 && PlayerInfo[issuerid][gHabilidadeEagle] <= 400)
- {
- amount = 37;
- }
- if(PlayerInfo[issuerid][gHabilidadeEagle] >= 401 && PlayerInfo[issuerid][gHabilidadeEagle] <= 600)
- {
- amount = 42;
- }
- if(PlayerInfo[issuerid][gHabilidadeEagle] > 600)
- {
- amount = 47;
- }
- }
- if(weaponid == 25)
- {
- if(PlayerInfo[issuerid][gHabilidadeShotgun] <= 200)
- {
- amount = 27;
- }
- if(PlayerInfo[issuerid][gHabilidadeShotgun] >= 201 && PlayerInfo[issuerid][gHabilidadeShotgun] <= 400)
- {
- amount = 32;
- }
- if(PlayerInfo[issuerid][gHabilidadeShotgun] >= 401 && PlayerInfo[issuerid][gHabilidadeShotgun] <= 600)
- {
- amount = 37;
- }
- if(PlayerInfo[issuerid][gHabilidadeShotgun] > 600)
- {
- amount = 42;
- }
- }
- if(weaponid == 26)
- {
- if(PlayerInfo[issuerid][gHabilidadeSawnoff] <= 200)
- {
- amount = 27;
- }
- if(PlayerInfo[issuerid][gHabilidadeSawnoff] >= 201 && PlayerInfo[issuerid][gHabilidadeSawnoff] <= 400)
- {
- amount = 32;
- }
- if(PlayerInfo[issuerid][gHabilidadeSawnoff] >= 401 && PlayerInfo[issuerid][gHabilidadeSawnoff] <= 600)
- {
- amount = 37;
- }
- if(PlayerInfo[issuerid][gHabilidadeSawnoff] > 600)
- {
- amount = 42;
- }
- }
- if(weaponid == 27)
- {
- if(PlayerInfo[issuerid][gHabilidadeCombatShotgun] <= 200)
- {
- amount = 22;
- }
- if(PlayerInfo[issuerid][gHabilidadeCombatShotgun] >= 201 && PlayerInfo[issuerid][gHabilidadeCombatShotgun] <= 400)
- {
- amount = 27;
- }
- if(PlayerInfo[issuerid][gHabilidadeCombatShotgun] >= 401 && PlayerInfo[issuerid][gHabilidadeCombatShotgun] <= 600)
- {
- amount = 32;
- }
- if(PlayerInfo[issuerid][gHabilidadeCombatShotgun] > 600)
- {
- amount = 37;
- }
- }
- if(weaponid == 28)
- {
- if(PlayerInfo[issuerid][gHabilidadeUzi] <= 200)
- {
- amount = 1;
- }
- if(PlayerInfo[issuerid][gHabilidadeUzi] >= 201 && PlayerInfo[issuerid][gHabilidadeUzi] <= 400)
- {
- amount = 1;
- }
- if(PlayerInfo[issuerid][gHabilidadeUzi] >= 401 && PlayerInfo[issuerid][gHabilidadeUzi] <= 600)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeUzi] > 600)
- {
- amount = 2;
- }
- }
- if(weaponid == 29)
- {
- if(PlayerInfo[issuerid][gHabilidadeMP5] <= 200)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeMP5] >= 201 && PlayerInfo[issuerid][gHabilidadeMP5] <= 400)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeMP5] >= 401 && PlayerInfo[issuerid][gHabilidadeMP5] <= 600)
- {
- amount = 3;
- }
- if(PlayerInfo[issuerid][gHabilidadeMP5] > 600)
- {
- amount = 3;
- }
- }
- if(weaponid == 30)
- {
- if(PlayerInfo[issuerid][gHabilidadeAK47] <= 200)
- {
- amount = 1;
- }
- if(PlayerInfo[issuerid][gHabilidadeAK47] >= 201 && PlayerInfo[issuerid][gHabilidadeAK47] <= 400)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeAK47] >= 401 && PlayerInfo[issuerid][gHabilidadeAK47] <= 600)
- {
- amount = 3;
- }
- if(PlayerInfo[issuerid][gHabilidadeAK47] > 600)
- {
- amount = 4;
- }
- }
- if(weaponid == 31)
- {
- if(PlayerInfo[issuerid][gHabilidadeM4] <= 200)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeM4] >= 201 && PlayerInfo[issuerid][gHabilidadeM4] <= 400)
- {
- amount = 3;
- }
- if(PlayerInfo[issuerid][gHabilidadeM4] >= 401 && PlayerInfo[issuerid][gHabilidadeM4] <= 600)
- {
- amount = 4;
- }
- if(PlayerInfo[issuerid][gHabilidadeM4] > 600)
- {
- amount = 5;
- }
- }
- if(weaponid == 32)
- {
- if(PlayerInfo[issuerid][gHabilidadeTec9] <= 200)
- {
- amount = 1;
- }
- if(PlayerInfo[issuerid][gHabilidadeTec9] >= 201 && PlayerInfo[issuerid][gHabilidadeTec9] <= 400)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeTec9] >= 401 && PlayerInfo[issuerid][gHabilidadeTec9] <= 600)
- {
- amount = 2;
- }
- if(PlayerInfo[issuerid][gHabilidadeTec9] > 600)
- {
- amount = 3;
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_CERTEZA)
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DIALOG_ESCOLHERARMA, DIALOG_STYLE_LIST, "Escolha com que arma você deseja treinar", "Pistola 9mm\nPistola 9mm Silenciada\nPistola Desert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nUZI\nMP5\nAK-47\nFuzil M4\nTec-9", "Confirmar", "");
- SetPlayerPos(playerid, 2775.8000500,-2336.8000500,13.3000000);
- SetPlayerFacingAngle(playerid, 88.0);
- ResetPlayerWeapons(playerid);
- }
- else
- {
- SendClientMessage(playerid, Vermelho, "OK, aguardamos a sua volta, até logo.");
- }
- }
- if(dialogid == DIALOG_ESCOLHERARMA)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 22, 999);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 23, 999);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 24, 999);
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 25, 999);
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid, 26, 999);
- }
- if(listitem == 5)
- {
- GivePlayerWeapon(playerid, 27, 999);
- }
- if(listitem == 6)
- {
- GivePlayerWeapon(playerid, 28, 999);
- }
- if(listitem == 7)
- {
- GivePlayerWeapon(playerid, 29, 999);
- }
- if(listitem == 8)
- {
- GivePlayerWeapon(playerid, 30, 999);
- }
- if(listitem == 9)
- {
- GivePlayerWeapon(playerid, 31, 999);
- }
- if(listitem == 10)
- {
- GivePlayerWeapon(playerid, 32, 999);
- }
- SendClientMessage(playerid, Vermelho, "Para sair do treino use /sairtreino");
- SendClientMessage(playerid, Amarelo, "Acerte o alvo da maior distância possível, boa-sorte !");
- TogglePlayerControllable(playerid, true);
- pTreinando[playerid] = true;
- SetPlayerVirtualWorld(playerid, playerid);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(QuerendoTreinar[playerid] == true)
- {
- ShowPlayerDialog(playerid, DIALOG_CERTEZA, DIALOG_STYLE_MSGBOX, "Você tem certeza ?", "Se decidir prosseguir perderá todas as armas.\nTem certeza que deseja continuar ?", "SIM", "NAO");
- DisablePlayerCheckpoint(playerid);
- QuerendoTreinar[playerid] = false;
- }
- return 1;
- }
- /* COMANDOS */
- CMD:tutorialhabilidades(playerid)
- {
- SendClientMessage(playerid, Amarelo, "Este servidor conta com o sistema de habilidades com armas feito por Graf_Spee");
- SendClientMessage(playerid, Amarelo, "O sistema funciona da seguinte forma: cada jogador possui uma habilidade específica [...]");
- SendClientMessage(playerid, Amarelo, "[...] para cada arma, quanto maior for esta habilidade, maior dano a arma dará.");
- SendClientMessage(playerid, Amarelo, "Para treinar a sua habilidade, use: /treinoarmas e dirija-se ao ponto vermelho no mapa.");
- return 1;
- }
- CMD:treinoarmas(playerid)
- {
- QuerendoTreinar[playerid] = true;
- SetPlayerPos(playerid, 2613.8999000, -2382.3000500, 13.3000000);
- SetPlayerCheckpoint(playerid, 2613.8999000, -2382.3000500, 13.3000000, 3.0);
- pAtirou[playerid] = false;
- pTreinando[playerid] = false;
- pAvisado[playerid] = 0;
- return 1;
- }
- CMD:sairtreino(playerid)
- {
- SendClientMessage(playerid, AzulCiano, "Você saiu do treino.");
- SetPlayerPos(playerid, 2613.8999000, -2382.3000500, 13.3000000);
- PlayerPlaySound(playerid, 1150, 2613.8999000, -2382.3000500, 13.3000000);
- SetPlayerVirtualWorld(playerid, 0);
- pTreinando[playerid] = false;
- pAtirou[playerid] = false;
- pAvisado[playerid] = 0;
- return 1;
- }
- stock GetPlayerNameEx(playerid)
- {
- new N[25];
- GetPlayerName(playerid,N,sizeof(N));
- return N;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement