18.05.2012, 04:07
pawn Код:
if(strcmp(cmdtext, "/plantarbomba", true)==0 || strcmp(cmdtext, "/pbomba", true)==0)
{
new org = GetPlayerOrg(playerid);
GetPlayerName(playerid,playername,sizeof(playername));
if(usarbombas == 1) return SendClientMessage(playerid, COLOR_GREY, "Uma bomba jб foi plantada,vocк deverб esperar");
{
if (pbomba[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб plantou uma bomba deverб esperar.");
{
if(org == 6 || org == 15)
{
format(string, sizeof(string), "Terrorista{23f518} %s {f5f3f0}Plantou uma bomba em algum local da cidade",playername);
SendClientMessageToAll(COLOR_WHITE, string);
GetPlayerPos(playerid,PosBombaX,PosBombaY,PosBombaZ);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
dinid = CreateDynamicObject(1252,x,y,z-0.8,0,0,0); //VAI CRIAR O OBJETO
pbomba[playerid] = 0;
pbomba2[playerid] = 1;
usarbombas = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetTimer("usarbomba", 2700000, false);
return 1;
}
}
}
}
if(strcmp(cmdtext, "/desarmarbomba", true)==0 || strcmp(cmdtext, "/dsbomba", true)==0)
{
new org = GetPlayerOrg(playerid);
GetPlayerName(playerid,playername,sizeof(playername));
if (pbomba2[playerid] != 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo plantou uma bomba");
{
if(org == 6 || org == 15)
{
format(string, sizeof(string), "Terrorista{23f518} %s {f5f3f0}Desarmou a bomba",playername);
SendClientMessageToAll(COLOR_WHITE, string);
SetTimerEx("usebomb", 1200000, false, "i", playerid);
SetTimerEx("DestruirObjeto",5000,false,"d",dinid); //AQI O TEMPO QE O OBJETO VAI SUMIR.
pbomba[playerid] = 0;
pbomba2[playerid] = 0;
return 1;
}
}
}
if(strcmp(cmdtext, "/detonarbomba", true)==0 || strcmp(cmdtext, "/dbomba", true)==0)
{
new org = GetPlayerOrg(playerid);
GetPlayerName(playerid,playername,sizeof(playername));
if (pbomba2[playerid] != 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo plantou uma bomba");
{
if(org == 6 || org == 15)
{
format(string, sizeof(string), "Terrorista{23f518} %s {f5f3f0}Detonou a bomba",playername);
SendClientMessageToAll(COLOR_WHITE, string);
CreateExplosion(PosBombaX,PosBombaY,PosBombaZ,5,5.0);
DestroyPlayerObject(playerid, 1495);
SetTimerEx("usebomb", 1200000, false, "i", playerid);
SetTimerEx("DestruirObjeto",5000,false,"d",dinid); //AQI O TEMPO QE O OBJETO VAI SUMIR.
pbomba[playerid] = 0;
pbomba2[playerid] = 0;
return 1;
}
}
}