05.09.2012, 21:35
Queria, que alguem criasse o comando de desarmar a bomba nuclear, para os cops, mas so o exercito pode desarma, se alguem poder, eu agradeзo
pawn Код:
if(strcmp(cmdtext, "/plantarbomba", true) == 0)
{
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
if(Nuking)
{
SendClientMessage(playerid,COLOR_YELLOW,"Ja existe Bomba Plantada.");
return 1;
}
if(pbnuclear == 1)
{
SendClientMessage(playerid,COLOR_GRAD2,"Jб usaram Bomba Nuclear, aguarde 1 Hora para usar novamente!");
return 1;
}
Nuking = true;
new Float:x,Float:y,Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
x += (2 * floatsin(-a, degrees));
y += (2 * floatcos(-a, degrees));
ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
NuclearBomb = CreateObject(3786, x, y, z, 0, 0, 96);
SendClientMessage(playerid,0xFFC801C8,"Vocк Plantou uma Bomba Nuclear . Use /detonar para Detonar.");
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "[Terrorista]{3399FF} %s {9DA0A0}Uma Bomba Nuclear Foi Plantada No Brasil, A Presidente Dilma ja foi Avisada.",sendername);
SendClientMessageToAll(COLOR_WHITE, string);
pbnuclear = 1;
Tempobombanuclear = SetTimer("bombanuclear", 3600000, 0);
return 1;
}
}
if(strcmp (cmdtext, "/detonar", true) == 0)
{
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
if(!Nuking)
{
SendClientMessage(playerid,COLOR_YELLOW,"Nгo ha Bombas Plantadas.");
return 1;
}
Nuking = false;
new Float:x,Float:y,Float:z;
GetObjectPos(NuclearBomb, x, y, z);
DestroyObject(NuclearBomb);
CreateExplosion(x, y, z, 7, 10);
CreateExplosion(x, y, z+3, 7, 10);
CreateExplosion(x, y, z+6, 7, 10);
CreateExplosion(x, y, z+9, 7, 10);
CreateExplosion(x, y, z+12, 7, 10);
CreateExplosion(x, y, z+15, 7, 10);
CreateExplosion(x, y, z+18, 7, 10);
CreateExplosion(x, y, z+21, 7, 10);
CreateExplosion(x, y+7, z+21, 7, 10);
CreateExplosion(x, y-7, z+21, 7, 10);
CreateExplosion(x+7, y, z+21, 7, 10);
CreateExplosion(x-7, y, z+21, 7, 10);
CreateExplosion(x, y, z+24, 7, 10);
CreateExplosion(x, y+10, z+24, 7, 10);
CreateExplosion(x, y-10, z+24, 7, 10);
CreateExplosion(x+10, y, z+24, 7, 10);
CreateExplosion(x-10, y, z+24, 7, 10);
CreateExplosion(x, y, z+27, 7, 10);
CreateExplosion(x, y+7, z+27, 7, 10);
CreateExplosion(x, y-7, z+27, 7, 10);
CreateExplosion(x+7, y, z+27, 7, 10);
CreateExplosion(x-7, y, z+27, 7, 10);
CreateExplosion(x, y, z+30, 7, 10);
CreateExplosion(x, y+3, z+30, 7, 10);
CreateExplosion(x, y-3, z+30, 7, 10);
CreateExplosion(x+3, y, z+30, 7, 10);
CreateExplosion(x-3, y, z+30, 7, 10);
SendClientMessage(playerid,COR_GRO,"Bomba Detonada.");
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, 128, "[Noticias Urgente]{3399FF} %s {9DA0A0}Ai Meu Deus, Ah Bomba Nuclear Foi Detonada, Nao Houve Sobreviventes!",playername);
SendClientMessageToAll(COLOR_WHITE , string);
SetWeather(44);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,5000,x,y,z))
{
if(IsPlayerInAnyVehicle(i))
{
SetVehicleHealth(GetPlayerVehicleID(i),0.0);
}
for(new allplayers = 0; allplayers < GetMaxPlayers(); allplayers++)
SetPlayerHealth(allplayers, 0.0);
PlayerPlaySound(playerid, 1159, x, y, z);
}
}
}
return 1;
}
}