Advertisement
Guest User

cents.pwn

a guest
Aug 14th, 2011
1,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.33 KB | None | 0 0
  1. //==========================================================
  2. //      Cents filterscript version 1.0 by MadeMan
  3. //==========================================================
  4.  
  5. #define FILTERSCRIPT
  6.  
  7. #include <a_samp>
  8.  
  9. new Text:tdCents[MAX_PLAYERS];
  10.  
  11. forward UpdateCentsDisplay(playerid, _cents_string[]);
  12.  
  13. public UpdateCentsDisplay(playerid, _cents_string[])
  14. {
  15.     TextDrawSetString(tdCents[playerid], _cents_string);
  16. }
  17.  
  18. public OnFilterScriptInit()
  19. {
  20.     print("\n----------------------------------------------");
  21.     print(" Cents filterscript version 1.0 by MadeMan");
  22.     print("----------------------------------------------\n");
  23.     return 1;
  24. }
  25.  
  26. public OnFilterScriptExit()
  27. {
  28.     return 1;
  29. }
  30.  
  31. public OnPlayerConnect(playerid)
  32. {
  33.     tdCents[playerid] = TextDrawCreate(608.000, 77.000, "~g~.00");
  34.     TextDrawFont(tdCents[playerid], 3);
  35.     TextDrawLetterSize(tdCents[playerid], 0.500, 2.200);
  36.     TextDrawSetOutline(tdCents[playerid], 2);
  37.     return 1;
  38. }
  39.  
  40. public OnPlayerDisconnect(playerid, reason)
  41. {
  42.     TextDrawDestroy(tdCents[playerid]);
  43.     return 1;
  44. }
  45.  
  46. public OnPlayerStateChange(playerid, newstate, oldstate)
  47. {
  48.     switch(newstate)
  49.     {
  50.         case PLAYER_STATE_ONFOOT, PLAYER_STATE_DRIVER, PLAYER_STATE_PASSENGER:
  51.             TextDrawShowForPlayer(playerid, tdCents[playerid]);
  52.         default:
  53.             TextDrawHideForPlayer(playerid, tdCents[playerid]);
  54.     }
  55.     return 1;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement