Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command(barreira, playerid, params[]) {
- if(sscanf(params, "i", sscanfid[0])) return SendClientMessage(playerid, COLOR_LIGHTRED, "[Sintaxe]: /barreira <(1-6)>");
- if(sscanfid[0] > 6 || sscanfid[0] < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "Use de 1 a 6.");
- 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.");
- new Float:P[4];
- GetPlayerPos(playerid, P[0], P[1], P[2]);
- GetPlayerFacingAngle(playerid, P[3]);
- switch(sscanfid[0]) {
- case 1: {
- CreateRoadblock(1228, P[0], P[1], P[2], P[3]+0.5);
- GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
- }
- case 2: {
- CreateRoadblock(1237, P[0], P[1], P[2], P[3]+0.5);
- GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
- }
- case 3: {
- CreateRoadblock(978, P[0], P[1], P[2], P[3]+0.5);
- GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
- }
- case 4: {
- CreateRoadblock(1425, P[0], P[1], P[2], P[3]+0.5);
- GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
- }
- case 5: {
- CreateRoadblock(3091, P[0], P[1], P[2], P[3]+0.5);
- GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
- }
- case 6: {
- CreateRoadblock(3526, P[0], P[1], P[2], P[3]+0.5);
- GameTextForPlayer(playerid, "~w~Barreira ~b~Criada", 3000, 1);
- }
- }
- format(_string, 128, "* %s criou uma barreira em sua posição. ", GetMaskName(playerid));
- SendMessageToFaction(AccountData[playerid][Faction], COLOR_POLICE, _string);
- return 1;
- }
- command(rbarreira, playerid, params[]) {
- 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.");
- DeleteClosestRoadblock(playerid);
- GameTextForPlayer(playerid, "~r~Barreira removida.", 3000, 1);
- return 1;
- }
- command(rallbarreira, playerid, params[]) {
- 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.");
- if(AccountData[playerid][Rank] < 5) return SendClientMessage(playerid, COLOR_LIGHTRED, "Apenas cargos 5+");
- DeleteAllRoadblocks();
- GameTextForPlayer(playerid, "~r~Todas as barreiras foram removidas.", 3000, 1);
- format(_string, 128, "[CENTRAL]: %s removeu todas as barreiras. ", GetMaskName(playerid));
- SendMessageToFaction(AccountData[playerid][Faction], COLOR_POLICE, _string);
- return 1;
- }
Add Comment
Please, Sign In to add comment