Guest User

Untitled

a guest
Jun 20th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. public PayDay(playerid)
  2. {
  3. for(new i=0; i<GetMaxPlayers(); i++)
  4. {
  5. if(IsPlayerConnected(i))
  6. {
  7. if(GetPVarInt(i, "ZeitSeitPD") == 60)//Wenn die Variable "ZeitSeitPD" über 60 ist, das heist ja das er eine stunde gespielt hat,...
  8. {
  9. new geld = random(250)+100;
  10. new geld1 = random(50)+10;
  11. new geld2 = random(50)+10;
  12. new string [128];
  13. SetPVarInt(i, "ZeitSeitPD", 1); //...wird die Variable "ZeitSeitPD" wieder auf 1 gesetzt
  14. SendClientMessage(i,COLOR_WEISS, "=======================[Kontoauszug]====================="); //Diese Meldung bekommt der Player dan, ändert sie einfach so wie ihr sie haben wollt.
  15. format(string, sizeof(string), "[Gehalt :+ %d $] [Handy: - %d $]",geld,GetPVarInt(i,"Phonek"));
  16. SendClientMessage(i,COLOR_LIGHTBLUE,string);
  17. if(GetPVarInt(i, "HausKey") >0)
  18. {
  19. format(string, sizeof(string), "[Stromkosten :- %d $] [Wasserkosten: - %d $]",geld1,geld2);
  20. SendClientMessage(i,COLOR_LIGHTBLUE,string);
  21. }
  22. if(GetPVarInt(i, "VIP") == 1)
  23. {
  24. SendClientMessage(i,COLOR_LIGHTBLUE,"Du bekommst einen VIP zuschlag von 500$");
  25. }
  26. SendClientMessage(i,COLOR_WEISS, "=========================================================");
  27. //GivePlayerMoney(i,geld);
  28. SetPVarInt(i, "Bank",GetPVarInt(i,"Bank")+geld);
  29. SetPVarInt(i, "Bank",GetPVarInt(i,"Bank")-geld1);
  30. SetPVarInt(i, "Bank",GetPVarInt(i,"Bank")-geld2);
  31. GivePlayerMoney(i,-GetPVarInt(i,"Phonek"));
  32. GameTextForPlayer(i, "~g~PayDay", 5000, 1);
  33. SetPVarInt(i, "Respektpunkte", GetPVarInt(i, "Respektpunkte")+1);//Hier wird zu der Variable "Repektpunkte" 1 dazu gerechnet.
  34. SetPVarInt(i, "Phonek", 0);
  35. if(GetPVarInt(i, "JobZeit") >= 1)
  36. {
  37. SetPVarInt(i, "JobZeit", GetPVarInt(i, "JobZeit")-1);
  38. }
  39. if(GetPVarInt(i, "VIP") == 1)
  40. {
  41. GivePlayerMoney(i,500);
  42. SetPVarInt(i, "Respektpunkte", GetPVarInt(i, "Respektpunkte")+1);
  43. }
  44. if(GetPVarInt(i,"Wanted")>=1)
  45. {
  46. SetPVarInt(i, "Wanted",GetPVarInt(i, "Wanted")-1);
  47. }
  48. return 1;
  49. }
  50. else//Wenn er noch keine 60min. gespielt hat, ...
  51. {
  52. SetPVarInt(i, "ZeitSeitPD", GetPVarInt(i, "ZeitSeitPD")+1); //... wird zu der Variable "ZeitSeitPD" 1 dazugerechnet
  53. SetPVarInt(i, "spielzeit",GetPVarInt(i,"spielzeit")+1);
  54. }
  55. }
  56. if(GetPVarInt(i, "KnastZeit") >= 1)
  57. {
  58. SetPVarInt(i, "KnastZeit",GetPVarInt(i, "KnastZeit")-1);
  59. if(GetPVarInt(i, "KnastZeit") == 0)
  60. {
  61. SetPVarInt(i, "KnastID",0);
  62. Spawn(i);
  63. }
  64. }
  65.  
  66. }
  67. return 1;
  68. }
Add Comment
Please, Sign In to add comment