Drugs not function properly argh!
#1

pawn Код:
CMD:td(playerid,params[])
{
    new amount;
    if(sscanf(params, "d", amount)) return SendClientMessage(playerid, -1, "USAGE: /td [amount]");
    if(0 < amount <= PlayerInfo[playerid][drugs])
    {
        new Float:Health;
        GetPlayerHealth(playerid, Health);
        SetPlayerHealth(playerid, Health+10);
        PlayerInfo[playerid][drugs] -= amount;
        SetTimerEx("Usedrugs", 2500*amount, false, "d", playerid);
        new string[ 128 ];
        format(string, sizeof(string), "You are smoking %d gram(s).", amount);
        SendClientMessage(playerid, -1, string);
    }
    else
    {
        SendClientMessage(playerid, -1, "You don't have enough drugs.");
    }
    return 1;
}
What its ment to do is...
Lets say I take /td 1 its ment to put my health going up slowly for about 30 milli seconds but on the other hand if I do /td 10 its ment to let my health carry on going for about 3 seconds in real life...
Reply
#2

Like I want it to go +5 each second...
Reply
#3

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)