daily pastebin goal
20%
SHARE
TWEET

exd_money.inc

exod182 Jan 21st, 2016 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2.  
  3. new PlayerText:MoneyDraw[MAX_PLAYERS][3];
  4. new PlayerMoney[MAX_PLAYERS];
  5.  
  6. forward money_OPC(playerid);
  7. public OnPlayerConnect(playerid){
  8.     MoneyDraw[playerid][0] = CreatePlayerTextDraw(playerid, 610.233398, 78.199264, "usebox");
  9.     PlayerTextDrawLetterSize(playerid, MoneyDraw[playerid][0], 0.000000, 2.080657);
  10.     PlayerTextDrawTextSize(playerid, MoneyDraw[playerid][0], 495.233245, 0.000000);
  11.     PlayerTextDrawAlignment(playerid, MoneyDraw[playerid][0], 1);
  12.     PlayerTextDrawColor(playerid, MoneyDraw[playerid][0], 0);
  13.     PlayerTextDrawUseBox(playerid, MoneyDraw[playerid][0], true);
  14.     PlayerTextDrawBoxColor(playerid, MoneyDraw[playerid][0], -5963521);
  15.     PlayerTextDrawSetShadow(playerid, MoneyDraw[playerid][0], 0);
  16.     PlayerTextDrawSetOutline(playerid, MoneyDraw[playerid][0], 0);
  17.     PlayerTextDrawFont(playerid, MoneyDraw[playerid][0], 0);
  18.  
  19.     MoneyDraw[playerid][1] = CreatePlayerTextDraw(playerid, 608.533813, 80.190361, "usebox");
  20.     PlayerTextDrawLetterSize(playerid, MoneyDraw[playerid][1], 0.000000, 1.638805);
  21.     PlayerTextDrawTextSize(playerid, MoneyDraw[playerid][1], 496.733184, 0.000000);
  22.     PlayerTextDrawAlignment(playerid, MoneyDraw[playerid][1], 1);
  23.     PlayerTextDrawColor(playerid, MoneyDraw[playerid][1], 0);
  24.     PlayerTextDrawUseBox(playerid, MoneyDraw[playerid][1], true);
  25.     PlayerTextDrawBoxColor(playerid, MoneyDraw[playerid][1], 255);
  26.     PlayerTextDrawSetShadow(playerid, MoneyDraw[playerid][1], 0);
  27.     PlayerTextDrawSetOutline(playerid, MoneyDraw[playerid][1], 0);
  28.     PlayerTextDrawFont(playerid, MoneyDraw[playerid][1], 0);
  29.  
  30.     MoneyDraw[playerid][2] = CreatePlayerTextDraw(playerid, 506.233306, 83.211807, "0 Euro");
  31.     PlayerTextDrawLetterSize(playerid, MoneyDraw[playerid][2], 0.250333, 0.957036);
  32.     PlayerTextDrawAlignment(playerid, MoneyDraw[playerid][2], 1);
  33.     PlayerTextDrawColor(playerid, MoneyDraw[playerid][2], -1);
  34.     PlayerTextDrawSetShadow(playerid, MoneyDraw[playerid][2], 0);
  35.     PlayerTextDrawSetOutline(playerid, MoneyDraw[playerid][2], 1);
  36.     PlayerTextDrawBackgroundColor(playerid, MoneyDraw[playerid][2], 51);
  37.     PlayerTextDrawFont(playerid, MoneyDraw[playerid][2], 2);
  38.     PlayerTextDrawSetProportional(playerid, MoneyDraw[playerid][2], 1);
  39.    
  40.     PlayerMoney[playerid] = 0;
  41.    
  42.     for(new i=0; i<3; i++){
  43.         PlayerTextDrawShow(playerid, MoneyDraw[playerid][i]);
  44.     }
  45.    
  46.     return CallLocalFunction("money_OPC", "i", playerid);
  47. }
  48.  
  49. stock m_GivePlayerMoney(playerid, amount){
  50.     new string[64];
  51.     PlayerMoney[playerid] += amount;
  52.     format(string, sizeof(string), "%i Euro", PlayerMoney[playerid]);
  53.     PlayerTextDrawSetString(playerid, MoneyDraw[playerid][2], string);
  54.     return 1;
  55. }
  56.  
  57. stock m_ResetPlayerMoney(playerid){
  58.     new string[64];
  59.     PlayerMoney[playerid] = 0;
  60.     format(string, sizeof(string), "%i Euro", PlayerMoney[playerid]);
  61.     PlayerTextDrawSetString(playerid, MoneyDraw[playerid][2], string);
  62.     return 1;
  63. }
  64.  
  65. stock m_GetPlayerMoney(playerid)return PlayerMoney[playerid];
  66. //
  67. #if defined _ALS_OnPlayerConnect
  68.     #undef OnPlayerConnect
  69. #else
  70.     #define _ALS_OnPlayerConnect
  71. #endif
  72. #define OnPlayerConnect money_OPC
  73. //
  74. #if defined _ALS_GivePlayerMoney
  75.     #undef GivePlayerMoney
  76. #else
  77.     #define _ALS_GivePlayerMoney
  78. #endif
  79. #define GivePlayerMoney m_GivePlayerMoney
  80. //
  81. #if defined _ALS_ResetPlayerMoney
  82.     #undef ResetPlayerMoney
  83. #else
  84.     #define _ALS_ResetPlayerMoney
  85. #endif
  86. #define ResetPlayerMoney m_ResetPlayerMoney
  87. //
  88. #if defined _ALS_GetPlayerMoney
  89.     #undef GetPlayerMoney
  90. #else
  91.     #define _ALS_GetPlayerMoney
  92. #endif
  93. #define GetPlayerMoney m_GetPlayerMoney
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top