Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <foreach>
- #define COLOR_RED 0xFF0000AA
- #pragma tabsize 0
- //**********************
- #define PUBLIC:%0(%1) forward %0(%1); \
- public %0(%1) //An easy definition of public and forward
- //**********************
- new MoneyLost[MAX_PLAYERS];
- //**********************
- PUBLIC:OnPlayerUpdate(playerid)
- {
- if(GetPlayerMoney(playerid) > 1000000)
- {
- MoneyLost[playerid] =1;
- return 1;
- }
- else if(GetPlayerMoney(playerid) < 999999)
- {
- MoneyLost[playerid] =0;
- return 1;
- }
- return 1;
- }
- //**********************
- PUBLIC:OnFilterScriptInit()
- {
- SetTimer("MoneyInUs",10000,1);
- return 1;
- }
- //**********************
- PUBLIC:MoneyInUs()
- {
- foreach(new i:Player)
- {
- if(IsPlayerConnected(i)) {
- if(MoneyLost[i] == 1) {
- GivePlayerMoney(i,-3000); //You can change this
- SendClientMessage(i,COLOR_RED,"You have lost 3000$, go deposit them in the bank!");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment