if (strcmp(cmd, "/pexplosivo", true) == 0)
{
new Str[128];
if(PlayerInfo[playerid][pExplosivos] < 1)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem um explosivo, compre um no mercado negro!");
if(GetPVarInt(playerid, "VarBomba"))
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк jб plantou uma bomba!");
/* if(IsPlayerInRC(playerid))
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba aqui!");*/
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba agora!");
if(!PlayerInfo[playerid][ComExplosivo])return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo esta com o explosivo em mгos, use: /pegarexplosivo.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPVarInt(playerid, "VarObject", CreateObject(1252, x, y, z-0.8, 45.0, 0.0, 0.0));
SetPVarInt(playerid, "VarBomba", 1);
PlayerInfo[playerid][pExplosivos] --;
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,0,0);
PlayerInfo[playerid][ComExplosivo] = false;
RemovePlayerAttachedObject(playerid, Vaga_Roubo);
SetPlayerSpecialAction(playerid, 0);
SendClientMessage(playerid, COLORGZ_EXE, "*Vocк plantou uma bomba aqui, afaste-se e digite /detonarbomba para detona-la!");
format(Str, sizeof(Str), "*[BOMBA]: %s plantou uma bomba.", PlayerName(playerid));
ProxDetector(30.0, playerid, Str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", Str);
return 1;
}
DestroyObject(objectid);
if (strcmp(cmd, "/pexplosivo", true) == 0) { new Str[128]; if(PlayerInfo[playerid][pExplosivos] < 1) return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem um explosivo, compre um no mercado negro!"); if(GetPVarInt(playerid, "VarBomba")) return SendClientMessage(playerid, COLOR_GRAD1, " Vocк jб plantou uma bomba!"); /* if(IsPlayerInRC(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba aqui!");*/ if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba agora!"); if(!PlayerInfo[playerid][ComExplosivo])return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo esta com o explosivo em mгos, use: /pegarexplosivo."); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPVarInt(playerid, "VarObject", CreateObject(1252, x, y, z-0.8, 45.0, 0.0, 0.0)); SetPVarInt(playerid, "VarBomba", 1); PlayerInfo[playerid][pExplosivos] --; ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,0,0); PlayerInfo[playerid][ComExplosivo] = false; RemovePlayerAttachedObject(playerid, Vaga_Roubo); SetPlayerSpecialAction(playerid, 0); DestroyObject(Vaga_Roubo); SendClientMessage(playerid, COLORGZ_EXE, "*Vocк plantou uma bomba aqui, afaste-se e digite /detonarbomba para detona-la!"); format(Str, sizeof(Str), "*[BOMBA]: %s plantou uma bomba.", PlayerName(playerid)); ProxDetector(30.0, playerid, Str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", Str); return 1; }
DestroyObject(Vaga_Bomba);
#define Vaga_Roubo 6
if (strcmp(cmd, "/pegarexplosivo", true) == 0)
{
if(PlayerInfo[playerid][pExplosivos] > 0)
{
new string[128];
if(PlayerInfo[playerid][ComExplosivo])
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк ja esta com o explosivo na mгo.");
new id = CountAttachedObjects(playerid);
SetPlayerAttachedObject(playerid,id ,1252,6,0.032999,0.000000,-0.173999,-28.900001,-9.599999,5.199999,1.000000,1.000000,1.000000);
SetPlayerAttachedObject(1252,Vaga_Roubo,playerid,id);
PlayerInfo[playerid][ComExplosivo] = true;
format(string, sizeof string, "* %s pegou seu explosivo.", PlayerName(playerid));
ProxDetector(90.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_GRAD1, "*** Vocк pegou o explosivo, para guardar use: /guardarexplosivo.");
SetPlayerSpecialAction(playerid, 25);
}
else
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem um explosivo, compre um no mercado negro.");
return 1;
}
new BombaPlantar[MAX_PLAYERS];
if (strcmp(cmd, "/pegarexplosivo", true) == 0)
{
if(PlayerInfo[playerid][pExplosivos] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem um explosivo, compre um no mercado negro.");
new string[128];
if(PlayerInfo[playerid][ComExplosivo])
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк ja esta com o explosivo na mгo.");
BombaPlantar[playerid] = SetPlayerAttachedObject(playerid, Vaga_Roubo ,1252,6,0.032999,0.000000,-0.173999,-28.900001,-9.599999,5.199999,1.000000,1.000000,1.000000);
PlayerInfo[playerid][ComExplosivo] = true;
format(string, sizeof string, "* %s pegou seu explosivo.", PlayerName(playerid));
ProxDetector(90.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SendClientMessage(playerid, COLOR_GRAD1, "*** Vocк pegou o explosivo, para guardar use: /guardarexplosivo.");
SetPlayerSpecialAction(playerid, 25);
return 1;
}
if (strcmp(cmd, "/pexplosivo", true) == 0)
{
new Str[128];
if(PlayerInfo[playerid][pExplosivos] < 1)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem um explosivo, compre um no mercado negro!");
if(GetPVarInt(playerid, "VarBomba"))
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк jб plantou uma bomba!");
/* if(IsPlayerInRC(playerid))
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba aqui!");*/
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba agora!");
if(!PlayerInfo[playerid][ComExplosivo])return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo esta com o explosivo em mгos, use: /pegarexplosivo.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPVarInt(playerid, "VarObject", CreateObject(1252, x, y, z-0.8, 45.0, 0.0, 0.0));
SetPVarInt(playerid, "VarBomba", 1);
PlayerInfo[playerid][pExplosivos] --;
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,0,0);
PlayerInfo[playerid][ComExplosivo] = false;
RemovePlayerAttachedObject(playerid, BombaPlantar[playerid]);
SetPlayerSpecialAction(playerid, 0);
DestroyObject(Vaga_Roubo);
SendClientMessage(playerid, COLORGZ_EXE, "*Vocк plantou uma bomba aqui, afaste-se e digite /detonarbomba para detona-la!");
format(Str, sizeof(Str), "*[BOMBA]: %s plantou uma bomba.", PlayerName(playerid));
ProxDetector(30.0, playerid, Str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", Str);
return 1;
}
pawn Код:
|
CMD:pegarexplosivo(playerid)
{
if(PlayerInfo[playerid][pExplosivos] > 0)
{
new string[128];
if(PlayerInfo[playerid][ComExplosivo])
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк ja esta com o explosivo na mгo.");
new id = CountAttachedObjects(playerid);
SetPlayerAttachedObject(playerid,id ,1252,6,0.032999,0.000000,-0.173999,-28.900001,-9.599999,5.199999,1.000000,1.000000,1.000000);
SetPlayerAttachedObjectEx(1252,Vaga_Roubo,playerid,id);
PlayerInfo[playerid][ComExplosivo] = true;
format(string, sizeof string, "* %s pegou seu explosivo.", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_GRAD1, "*** Vocк pegou o explosivo, para guardar use: /guardarexplosivo.");
SetPlayerSpecialAction(playerid, 25);
}
else
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem um explosivo, compre um no mercado negro.");
return 1;
}
CMD:plantarbomba(playerid)
{
new Str[128];
if(PlayerInfo[playerid][pExplosivos] < 1)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem um explosivo, compre um no mercado negro!");
if(GetPVarInt(playerid, "VarBomba"))
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк jб plantou uma bomba!");
/*if(IsPlayerInRC(playerid))
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba aqui!");*/
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode plantar uma bomba agora!");
if(!PlayerInfo[playerid][ComExplosivo])return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo esta com o explosivo em mгos, use: /pegarexplosivo.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPVarInt(playerid, "VarObject", CreateDynamicObject(1252, x, y, z-0.8, 45.0, 0.0, 0.0));
SetPVarInt(playerid, "VarBomba", 1);
PlayerInfo[playerid][pExplosivos] --;
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,0,0);
PlayerInfo[playerid][ComExplosivo] = false;
RemovePlayerAttachedObjectEx(playerid, Vaga_Roubo);
SetPlayerSpecialAction(playerid, 0);
SendClientMessage(playerid, COLORGZ_EXE, "*Vocк plantou uma bomba aqui, afaste-se e digite /detonarbomba para detona-la!");
format(Str, sizeof(Str), "*[BOMBA]: %s plantou uma bomba.", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, Str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", Str);
return 1;
}