13.05.2011, 22:56
pawn Code:
if(strcmp(cmdtext, "/barreira", true)==0 || strcmp(cmdtext, "/br", true)==0)
{
if (!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um Policial!");
if(PlayerPaintballing[playerid] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode por barreiras no evento!");
return 1;
}
if (pRoadblock[playerid] != 0) return SendClientMessage(playerid, COLOR_GREY, "Vocк sу pode criar 1 barreira por vez, /rbr - para remover sua barreira");
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
pRoadblock[playerid] = F_CreateObject(981, X, Y, Z, 0.0, 0.0, A+180);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, "~w~Barreira ~r~Criada", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, "Barreira Implantada... Use /rbr Para Remove-la!");
format(string, sizeof(string), "Estado: Uma barreira foi posta por %s.", PlayerName(playerid));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
if (PlayerInfo[i][pCargo] >= 1 || PlayerInfo[i][pLider] > 6)
{
SendClientMessage(i, TEAM_BLUE_COLOR, "Vocк pode remover todas as barreiras usando /rbrall");
}
}
}
}
return 1;
}
if(strcmp(cmdtext, "/removerbarreira", true)==0 || strcmp(cmdtext, "/rbr", true)==0)
{
if (!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um Policial!");
if (pRoadblock[playerid] != 0)
{
RemoveRoadblock(playerid);
SendClientMessage(playerid, COLOR_GREY, "Vocк retirou a sua barreira!");
}
else { return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo criou uma barreira!"); }
format(string, sizeof(string), "Estado: Uma barreira foi destruнda por %s.", PlayerName(playerid));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
}
return 1;
}
if(strcmp(cmdtext, "/removertodasbarreiras", true)==0 || strcmp(cmdtext, "/rbrall", true)==0)
{
if (PlayerInfo[playerid][pCargo] >= 4 && IsACop(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pRoadblock[i] != 0)
{
RemoveRoadblock(i);
}
}
format(string, sizeof(string), "Estado: Todas as barreiras foram retiradas por: %s.", PlayerName(playerid));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк precisa ser cargo 4+ ou um lнder de alguma organizaзгo policial para remover todas as barreiras!");
}
return 1;
}
pawn Code:
if(strcmp(cmdtext, "/barreira", true)==0 || strcmp(cmdtext, "/br", true)==0)
{
if (gTeam[playerid] == 2 || IsACop(playerid))
{
if (PlayerInfo[playerid][pRoadblock] == 0)
{
if (roadblocktimer == 0)
{
if(Jurisdicao(playerid)){ }else{ return 1; }
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
PlayerInfo[playerid][pRoadblock] = CreateObject(981, X, Y, Z, 0.0, 0.0, A+180);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, "~w~Barreira ~r~Colocada", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, "Barreira implantada com sucesso, USE: /rbr ou /removerbarreira Para remove-la.");
roadblocktimer = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "HQ: %s criou uma barreira", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
SetTimer("ResetRoadblockTimer", 10, false);
}else{
SendClientMessage(playerid, COLOR_GREY, "Por favor espere um pouco, antes de colocar outra barreira!");
}
}else{
SendClientMessage(playerid, COLOR_GREY, "Voce so pode colocar 1 barreira por vez, USE: /rbr Para remover a barreira existente!");
}
}else{
SendClientMessage(playerid, COLOR_GREY, "Voce nao e um Oficial!");
}
return 1;
}
if(strcmp(cmdtext, "/removerbarreira", true)==0 || strcmp(cmdtext, "/rbr", true)==0)
{
if (gTeam[playerid] == 2 || IsACop(playerid))
{
if(Jurisdicao(playerid)){ }else{ return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "HQ: %s destruiu sua barreira.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1337)
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
}
if (PlayerInfo[playerid][pRoadblock] != 0)
{
RemoveRoadblock(playerid);
SendClientMessage(playerid, COLOR_GREEN, "Barreira removida com Sucesso!");
}else{
SendClientMessage(playerid, COLOR_GREY, "Voce nao implantou uma barreira!");
return 1;
}
}else{
SendClientMessage(playerid, COLOR_GREY, "Voce nao e um Oficial!");
return 1;
}
return 1;
}
if(strcmp(cmdtext, "/removerbarreiraall", true)==0 || strcmp(cmdtext, "/rbrall", true)==0)
{
if (gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 4)
{
if(Jurisdicao(playerid)){ }else{ return 1; }
if(PlayerInfo[playerid][pRank] <= 5)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pRoadblock] != 0)
{
RemoveRoadblock(i);
}
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "HQ: Todas as barreiras foram destruidas por ordem de %s.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Voce precisa de cargo 5+ para usar esse comando!");
}
return 1;
}
}
pawn Code:
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48217) : error 033: array must be indexed (variable "pRoadblock")
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48219) : error 017: undefined symbol "roadblocktimer"
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48221) : error 017: undefined symbol "Jurisdicao"
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48225) : error 033: array must be indexed (variable "pRoadblock")
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48229) : error 017: undefined symbol "roadblocktimer"
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48229) : warning 215: expression has no effect
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48256) : error 017: undefined symbol "Jurisdicao"
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48269) : error 033: array must be indexed (variable "pRoadblock")
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48289) : error 017: undefined symbol "Jurisdicao"
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48290) : error 017: undefined symbol "pRank"
D:\Cбssio\Game Modes SA-MP\TrueLife City [v2.0]\gamemodes\BTL.pwn(48294) : error 033: array must be indexed (variable "pRoadblock")