25.11.2011, 23:48
This one will take 5g each time the player used /td
pawn Код:
{
if(IsPlayerConnected(playerid))
{
if(Drugs[playerid] > 1) //or whatever your variable for storing drugs is
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health + 10.0);
SendClientMessage(playerid, COLOR_GREY, " You used 1g of your drugs.");
Drugs[playerid] -= 5;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You dont have any drugs.");
}
}//not connected
return 1;
}