08.10.2012, 01:22
PHP код:
if(strcmp(cmdtext, "/barreiragangue", true)==0 || strcmp(cmdtext, "/gangbr", true)==0)
{
new org = GetPlayerOrg(playerid);
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20 || org == 21 || org == 24 || org == 25 || org == 27)
{
if(PlayerPaintballing[playerid] != 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode por Blockeios no evento!");
return 1;
}
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
pRoadgang[playerid] = F_CreateObject(845, X+1, Y, Z, 0.0, 0.0, A+180, 300.0);
pRoadgang2[playerid] = F_CreateObject(1358, X+2, Y, Z, 0.0, 0.0, A+180, 300.0);
pRoadgang3[playerid] = F_CreateObject(18451, X, Y+5, Z, 0.0, 0.0, A+180, 300.0);
pRoadgang4[playerid] = F_CreateObject(12957, X, Y+9, Z, 0.0, 0.0, A+180, 300.0);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, "~w~Blockeio ~r~Criado", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, "Blockeio Posto Use /gangrbr Para Retira-la!");
format(string, sizeof(string), "[Gangster]: %s Coloco Um Blockeio De Gangue.", PlayerName(playerid));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20 || org == 21 || org == 23 || org == 22 || org == 24 || org == 25 || org == 27)
{
SendClientMessage(i, COR_GRO, string);
if (PlayerInfo[i][pCargo] >= 5 || PlayerInfo[i][pLider] > 0)
{
//SendClientMessage(i, TEAM_BLUE_COLOR, "Vocк pode remover todas as barreiras usando /rbrgangall");
}
}
}
}
}
return 1;
}
if(strcmp(cmdtext, "/removerbarreira", true)==0 || strcmp(cmdtext, "/gangrbr", true)==0)
{
new org = GetPlayerOrg(playerid);
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20 || org == 21 || org == 23 || org == 22 || org == 24 || org == 25 || org == 27)
{
if (pRoadgang[playerid] != 0)
{
RemoveRoadgang(playerid);
SendClientMessage(playerid, COLOR_GREY, "Vocк Tirou os Blockeios!");
}
else { return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo criou um Blockeios!"); }
format(string, sizeof(string), "[Gangster]: %s Retirou Teu Blockeio De Gangue.", PlayerName(playerid));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20 || org == 21 || org == 23 || org == 22 || org == 24 || org == 25 || org == 27)
{
SendClientMessage(i, COR_GRO, string);
}
}
}
}
return 1;
}