pawn Код:
if(strcmp(cmdtext, "/usardrogas", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerBoxing[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo pode usar drogas durante uma luta !");
return 1;
}
if(PlayerInfo[playerid][pDrugs] > 1)
{
PlayerStoned[playerid] += 0;
if(PlayerStoned[playerid] >= 3) { GameTextForPlayer(playerid, "~w~voce esta~n~~p~chapado", 4000, 1); }
new Float:Armour;
GetPlayerArmour(playerid, Armour);
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pDrugPerk] > 0)
{
SetPlayerArmour(playerid, Armour);
}
else
{
GivePlayerArmour(playerid,20);
}
SendClientMessage(playerid, COLOR_GREY, " Duas gramas usadas...");
format(string, sizeof(string), "* %s drogou-se.", sendername);
SetPlayerArmour(playerid, 40.0);
ApplyAnimation(playerid,"SMOKING","M_smk_in",4.1,0,1,1,1,1);
ApplyAnimation(playerid,"SMOKING","M_smk_in",4.1,0,1,1,1,1);
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pDrugs] -= 2;
if(STDPlayer[playerid]==1)
{
STDPlayer[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк jб nгo estб infectado com uma doenзa sexualmente transmissнvel mais por causa da droga !");
}
else if(STDPlayer[playerid]==2)
{
STDPlayer[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк reduziu a DST а clamнdia devido a droga !");
}
else if(STDPlayer[playerid]==3)
{
STDPlayer[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк reduziu a DST а gonorrйia devido a droga !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem gramas suficientes !");
}
}
return 1;
}