25.11.2011, 21:11
pawn Код:
if(strcmp(cmdtext, "/td", true) == 0)
{
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] -= 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You dont have any drugs.");
}
}//not connected
return 1;
}