CMD:usecrack(playerid, params[])
{
if(UseDrugsTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY,"You must wait 5 seconds!");
if(PlayerCrackStoned[playerid] >= 2)
{
SendClientMessage(playerid, COLOR_RED, "You have used too much crack; therefore you have overdosed!");
SendClientMessage(playerid, COLOR_RED, "You must seek medical attention or you will die!");
CrackDeathTimer[playerid] = SetTimerEx("Crackdeath", 10000, true, "i", playerid);
}
if(PlayerCrackStoned[playerid] >= 0)
{
GameTextForPlayer(playerid, "~p~You begin to feel~n~~g~ The crack high!", 4000, 6);
SetPlayerDrunkLevel(playerid, 15000);
SetPlayerWeather(playerid, 2009);
if(!IsPlayerInAnyVehicle(playerid)) { ApplyAnimation(playerid,"SMOKING","M_smk_drag",4.0,0,0,0,0,0); }
}
if(PlayerDrugInfo[playerid][pCrack] >= 1)
{
new Float:armor;
GetPlayerArmour(playerid, armor);
if(armor > 80) { SetPlayerArmour(playerid, 100.0); }
else { SetPlayerArmour(playerid, armor + 10.0); }
CrackFix[playerid] = SetTimerEx("CFixWeather", 30000, false, "i", playerid);
SendClientMessage(playerid, COLOR_BLUE, "You have used a gram of crack!");
UseDrugsTimer[playerid] = 1; PlayerDrugInfo[playerid][pCrack] -= 1;
SetTimerEx("UseDrugs",5*1000,0,"i",playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "You don't have any crack left!");
}
return 1;
}
CMD:usecrack(playerid, params[])
{
if(PlayerDrugInfo[playerid][pCrack] = 0) return SendClientMessage(playerid, COLOR_RED, "You don't have any crack left!");
if(UseDrugsTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY,"You must wait 5 seconds!");
if(PlayerCrackStoned[playerid] >= 2)
{
SendClientMessage(playerid, COLOR_RED, "You have used too much crack; therefore you have overdosed!");
SendClientMessage(playerid, COLOR_RED, "You must seek medical attention or you will die!");
CrackDeathTimer[playerid] = SetTimerEx("Crackdeath", 10000, true, "i", playerid);
}
if(PlayerCrackStoned[playerid] >= 0)
{
GameTextForPlayer(playerid, "~p~You begin to feel~n~~g~ The crack high!", 4000, 6);
SetPlayerDrunkLevel(playerid, 15000);
SetPlayerWeather(playerid, 2009);
if(!IsPlayerInAnyVehicle(playerid)) { ApplyAnimation(playerid,"SMOKING","M_smk_drag",4.0,0,0,0,0,0); }
}
new Float:armor;
GetPlayerArmour(playerid, armor);
if(armor > 80) { SetPlayerArmour(playerid, 100.0); }
else { SetPlayerArmour(playerid, armor + 10.0); }
CrackFix[playerid] = SetTimerEx("CFixWeather", 30000, false, "i", playerid);
SendClientMessage(playerid, COLOR_BLUE, "You have used a gram of crack!");
UseDrugsTimer[playerid] = 1; PlayerDrugInfo[playerid][pCrack] -= 1;
SetTimerEx("UseDrugs",5*1000,0,"i",playerid);
return 1;
}
PHP код:
|