21.08.2011, 16:19
Estou com problemas nas barreiras, quando eu crio uma barreira a barreira nгo apareзe. porfavor alguem me ajuda!
Vou mandar os cуdigos.
Porfavor me ajudem, porfavor.
Vou mandar os cуdigos.
Код:
}
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, 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)) 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;
}

