GiveCash Dialog??
#7

You don't necessarily need a dialog. You can make a simple one like this :
pawn Код:
COMMAND:givemoney(playerid, params[])
{
    if (IsPlayerAdmin(playerid))
    {
        new
          toplayerid, // the player we want to give money to
          amount;
        // extracting player's ID and amount from params
        if (!sscanf(params, "ii", toplayerid, amount))
        {
          if (toplayerid != INVALID_PLAYER_ID)
          {
            new
              message[40];
            GivePlayerMoney(toplayerid, amount);
            format(message, sizeof(message), "You got $%d from admin!", amount);
            SendClientMessage(toplayerid, 0x00FF00FF, message);
          }
          else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
        }
        else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /givemoney <playerid> <amount>");
    }
    else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
    return 1;
}
Source : https://sampforum.blast.hk/showthread.php?tid=91354
Reply


Messages In This Thread
GiveCash Dialog?? - by EmpireSk - 01.03.2014, 16:07
Re: GiveCash Dialog?? - by NewerthRoleplay - 01.03.2014, 16:11
Re: GiveCash Dialog?? - by EmpireSk - 01.03.2014, 16:13
Re: GiveCash Dialog?? - by EmpireSk - 01.03.2014, 17:37
Re: GiveCash Dialog?? - by EmpireSk - 01.03.2014, 18:56
Re: GiveCash Dialog?? - by SDLMMM - 01.03.2014, 18:59
Re: GiveCash Dialog?? - by Golimad - 01.03.2014, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)