Gguiz007

Untitled

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