Guest User

Untitled

a guest
Jun 21st, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.38 KB | None | 0 0
  1. SetTimer("PaydayT",1000,1);(1000 zum testen ;d)
  2.  
  3.  
  4.  
  5. OnPlayerConnect
  6.  
  7. pStats[playerid][pPayday] = 60;
  8.  
  9.  
  10.  
  11. Hier sollte eigentlich die zeit bis zum payday im TD angezeigt werden
  12.  
  13. stock UpdateStats(playerid)
  14. {
  15.     new string[150];
  16.     new jtext[25];
  17.     if(pStats[playerid][pJob] == 0) { jtext = "Arbeitslos"; }
  18.     else if(pStats[playerid][pJob] == 1) { jtext = "Mechatroniker"; }
  19.     else if(pStats[playerid][pJob] == 2) { jtext = "Taxifahrer"; }
  20.     else if(pStats[playerid][pJob] > 2) { jtext = "Arbeitslos"; }
  21.     else if(pStats[playerid][pJob] == 99) { jtext = "Hartz IV"; }
  22.  
  23.     format(string, sizeof(string),"Level: ~r~%d",GetPlayerScore(playerid));
  24.     TextDrawSetString(Stats4[playerid],string); // Level Update
  25.     format(string, sizeof(string),"Job: ~r~%s",jtext);
  26.     TextDrawSetString(Stats2[playerid],string); // Job Update
  27.     format(string, sizeof(string),"Payday in: %d",pStats[playerid][pPayday]);
  28.     TextDrawSetString(Stats3[playerid],string); // Punkte Update
  29. }
  30.  
  31.  
  32.  
  33.  
  34.  
  35. Payday public
  36.  
  37. forward PaydayT(playerid);
  38. public PaydayT(playerid)
  39. {
  40.     if(pStats[playerid][pPayday] > 0)
  41.     {
  42.         pStats[playerid][pPayday]--;
  43.         if(pStats[playerid][pPayday] == 0)
  44.         {
  45.             SendClientMessage(playerid,0x0000FFFF,"======================================================================");
  46.             if(IsACop(playerid))
  47.             {
  48.                 if(pStats[playerid][pRank] == 1)
  49.                 {
  50.                     SendClientMessage(playerid,0xFFFFFFFF,"Gehalt: {00FF00}1100%");
  51.                 }
  52.                 if(pStats[playerid][pRank] == 2)
  53.                 {
  54.                     SendClientMessage(playerid,0xFFFFFFFF,"Gehalt: {00FF00}1500%");
  55.                 }
  56.                 if(pStats[playerid][pRank] == 3)
  57.                 {
  58.                     SendClientMessage(playerid,0xFFFFFFFF,"Gehalt: {00FF00}1800%");
  59.                 }
  60.                 if(pStats[playerid][pRank] == 4)
  61.                 {
  62.                     SendClientMessage(playerid,0xFFFFFFFF,"Gehalt: {00FF00}2100%");
  63.                 }
  64.                 if(pStats[playerid][pRank] == 5)
  65.                 {
  66.                     SendClientMessage(playerid,0xFFFFFFFF,"Gehalt: {00FF00}2400%");
  67.                 }
  68.                 if(pStats[playerid][pRank] == 6)
  69.                 {
  70.                     SendClientMessage(playerid,0xFFFFFFFF,"Gehalt: {00FF00}4000%");
  71.                 }
  72.                
  73.             }
  74.             SendClientMessage(playerid,0x0000FFFF,"======================================================================");
  75.             pStats[playerid][pPayday] = 60;
  76.         }
  77.     }
  78.     return 1;
  79. }
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86. Laden:
  87.     pStats[playerid][pPayday] = GetPVarInt(playerid, "Payday");
  88.  
  89.  
  90. Speichern:
  91. INI_WriteInt(Acc,"Payday",pStats[playerid][pPayday]);
Advertisement
Add Comment
Please, Sign In to add comment