Buy drugs
#1

....
Reply
#2

Removed.
Reply
#3

somthing like this
change the var PlayerInfo to yours
this cmd with sscanf
pawn Код:
CMD:buydrugs(playerid,params[])
{
    new amount,string[100];
    if(sscanf(params,"d",amount)) return SendClientMessage(playerid,-1,"usage: /buydrugs [amount]");
    if(PlayerInfo[playerid][Drugs] > 450) return
    format(string,sizeof(string),"you already have %d gram of drugs, you cannot purchase more",PlayerInfo[playerid][Drugs]) && SendClientMessage(playerid,-1,string);
    PlayerInfo[playerid][Drugs]+=amount;
    return 1;
 }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)