Guest User

Untitled

a guest
Oct 15th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. command(barreira, playerid, params[]) {
  2. if(sscanf(params, "i", sscanfid[0])) return SendClientMessage(playerid, COLOR_LIGHTRED, "[Sintaxe]: /barreira <(1-6)>");
  3. if(sscanfid[0] > 6 || sscanfid[0] < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "Use de 1 a 6.");
  4. if(FactionData[ AccountData[playerid][Faction] ][fType] != FACTION_TYPE_CRIME && FactionData[ AccountData[playerid][Faction] ][fType] != FACTION_TYPE_MEDICAL) return SendClientMessage(playerid, -1, "Você não é membro de uma facção governamental.");
  5. new Float:P[4];
  6. GetPlayerPos(playerid, P[0], P[1], P[2]);
  7. GetPlayerFacingAngle(playerid, P[3]);
  8. switch(sscanfid[0]) {
  9. case 1: {
  10. CreateRoadblock(1228, P[0], P[1], P[2], P[3]+0.5);
  11. GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
  12. }
  13. case 2: {
  14. CreateRoadblock(1237, P[0], P[1], P[2], P[3]+0.5);
  15. GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
  16. }
  17. case 3: {
  18. CreateRoadblock(978, P[0], P[1], P[2], P[3]+0.5);
  19. GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
  20. }
  21. case 4: {
  22. CreateRoadblock(1425, P[0], P[1], P[2], P[3]+0.5);
  23. GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
  24. }
  25. case 5: {
  26. CreateRoadblock(3091, P[0], P[1], P[2], P[3]+0.5);
  27. GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
  28. }
  29. case 6: {
  30. CreateRoadblock(3526, P[0], P[1], P[2], P[3]+0.5);
  31. GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
  32. }
  33. }
  34. format(_string, 128, "* %s criou uma barreira em sua posição. ", GetMaskName(playerid));
  35. SendMessageToFaction(AccountData[playerid][Faction], COLOR_POLICE, _string);
  36. return 1;
  37. }
  38.  
  39. command(rbarreira, playerid, params[]) {
  40. if(FactionData[ AccountData[playerid][Faction] ][fType] != FACTION_TYPE_CRIME && FactionData[ AccountData[playerid][Faction] ][fType] != FACTION_TYPE_MEDICAL) return SendClientMessage(playerid, -1, "Você não é membro de uma facção governamental.");
  41. DeleteClosestRoadblock(playerid);
  42. GameTextForPlayer(playerid, "~r~Barreira removida.", 3000, 1);
  43. return 1;
  44. }
  45.  
  46. command(rallbarreira, playerid, params[]) {
  47. if(FactionData[AccountData[playerid][Faction]][fType] != FACTION_TYPE_CRIME && FactionData[AccountData[playerid][Faction]][fType] != FACTION_TYPE_MEDICAL) return SendClientMessage(playerid, -1, "Você não é membro de uma facção governamental.");
  48. if(AccountData[playerid][Rank] < 5) return SendClientMessage(playerid, COLOR_LIGHTRED, "Apenas cargos 5+");
  49. DeleteAllRoadblocks();
  50. GameTextForPlayer(playerid, "~r~Todas as barreiras foram removidas.", 3000, 1);
  51. format(_string, 128, "[CENTRAL]: %s removeu todas as barreiras. ", GetMaskName(playerid));
  52. SendMessageToFaction(AccountData[playerid][Faction], COLOR_POLICE, _string);
  53. return 1;
  54. }
Add Comment
Please, Sign In to add comment