Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include <sscanf2>
- #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- dcmd_pay(playerid,params[])
- {
- static ID, amount, name[MAX_PLAYERS], string7[200], name2[MAX_PLAYERS], string8[200];
- if (sscanf(params, "ii", ID,amount)) return SendClientMessage(playerid, 0xff0000aa, "* Usage: /pay [playerid/name] [amount]");
- if (amount > GetPlayerMoney(playerid)) return SendClientMessage(playerid, 0xff0000aa, "* You do not have enough money to pay that player!");
- if (amount <= 0) return SendClientMessage(playerid, 0xff0000aa, "* You can't pay less than 1!");
- if (playerid == ID) return SendClientMessage(playerid, 0xff0000aa, "* You can't pay yourselve!");
- GetPlayerName(ID, name2, sizeof(name2));
- format(string8,sizeof(string8),"{FFFF00}|- You have paid %s $%i -|",name2,amount);
- SendClientMessageToAll(COLOR_RED,string8);
- GetPlayerName(playerid, name, sizeof(name));
- format(string7,sizeof(string7),"{FFFF00}* %s(%d) Has paid you: $%i",name,playerid,amount);
- SendClientMessage(ID,COLOR_RED,string7);
- GivePlayerMoney(ID,amount);
- GivePlayerMoney(playerid,-amount);
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment