Gguiz007

Untitled

May 9th, 2020
906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.03 KB | None | 0 0
  1. CMD:roubar(playerid)
  2. {
  3.     if(IsPlayerInRangeOfPoint(playerid, 3.0, cXr, cYr, cZr))
  4.     {
  5.         if (APlayerData[playerid][PlayerClass] != ClassMafia) return SendClientMessage(playerid, -1, "{FF0000}Você não é um mafioso!");
  6.         if (APlayerData[playerid][InQuadrilha] == false) return SCM(playerid, 0xFF0000FF, "Você não está em uma quadrilha!");
  7.         if (roub == 1) return SCM(playerid, 0xFF0000FF, "Já estão roubando o cofre!");
  8.         if( GetPVarInt( playerid, "TempoComandoAFK" ) > GetTickCount() ) return SCM( playerid, -1, "{FF0000}Espere 4 horas para roubar novamente!" );
  9.         SetPVarInt( playerid, "TempoComandoAFK", GetTickCount() + 1000 * 60 * 60 * 4 );
  10.         if ((APlayerData[playerid][InQuadrilha] == false) && (AQuadrilhas[Quadrilha][Members][0] < 4) && (AQuadrilhas[Quadrilha[Members][1]]) < 4) && (AQuadrilhas[Quadrilha[Members][2]]) < 4) && (AQuadrilhas[Quadrilha[Members][3]]) < 4)) return SCM(playerid, 0xff0000FF, "Você precisa 4 membros para iniciar uma roubo.");
  11.         static Ladrao[MAX_PLAYER_NAME], sStr[128];
  12.         GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
  13.         if(Roubando[playerid] == 1) return SendClientMessage(playerid, 0xff0000FF, "Você já está assaltando!");
  14.         format(sStr, sizeof(sStr), "[ATENÇÃO] O Mafioso {ffffff}%s{ff0000} está roubando o cofre do Banco de LS!", Ladrao, playerid);
  15.         SendClientMessageToAll(0xFF0000FF, sStr);
  16.         format(sStr, sizeof(sStr), "{FF0000}Espere no local por {FFFFFF}%d{FF0000} minutos para concluir o roubo!", TempoRoubo);
  17.         SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.000000, -0.313611, 0.021003, 0.445490, 86.754409, 355.370239, 0.926815, 1.000000, 1.000000);
  18.         cmd_robrld(playerid);
  19.         SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+5);
  20.         SendClientMessage(playerid, 0xC9C9C9FF, sStr);
  21.         SetTimerEx("Roubou", 60000*TempoRoubo, false, "ii", playerid);
  22.         //SetTimerEx("Delay_Command", 1000 * 60 * 60, false, "ii", playerid);
  23.         Roubando[playerid] = 1;
  24.         cmd_robrld(playerid);
  25.         roub = 1;
  26.          }
  27.          return 1;
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment