Gguiz007

Untitled

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