12.12.2011, 21:03
Olб pessoal, ja vim aki pedir ajuda sobre a barreira, mais logo que eu arrumei, voltou a nгo funcionar as barreiras dos Cop's.
Aparece uma Mensagem no jogo quando os Cop's tentam criar Barreiras:
"Vocк nгo й um Policial."
Agradeзo se puderem me ajudar!
pawn Код:
//BARREIRAS
if(strcmp(cmdtext, "/barreira", true)==0 || strcmp(cmdtext, "/br", true)==0)
{
if (!IsACop(playerid) || GetPlayerOrg(playerid) != 26) 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] = Thiago_CreateObject(981, X, Y, Z, 0.0, 0.0, A+180, 300.0);
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] >= 5 || PlayerInfo[i][pLider] > 0)
{
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) || GetPlayerOrg(playerid) != 26) 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) || GetPlayerOrg(playerid) != 26)
{
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;
}
"Vocк nгo й um Policial."
Agradeзo se puderem me ajudar!