Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PayDay(playerid)
- {
- for(new i=0; i<GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPVarInt(i, "ZeitSeitPD") == 60)//Wenn die Variable "ZeitSeitPD" über 60 ist, das heist ja das er eine stunde gespielt hat,...
- {
- new geld = random(250)+100;
- new geld1 = random(50)+10;
- new geld2 = random(50)+10;
- new string [128];
- SetPVarInt(i, "ZeitSeitPD", 1); //...wird die Variable "ZeitSeitPD" wieder auf 1 gesetzt
- SendClientMessage(i,COLOR_WEISS, "=======================[Kontoauszug]====================="); //Diese Meldung bekommt der Player dan, ändert sie einfach so wie ihr sie haben wollt.
- format(string, sizeof(string), "[Gehalt :+ %d $] [Handy: - %d $]",geld,GetPVarInt(i,"Phonek"));
- SendClientMessage(i,COLOR_LIGHTBLUE,string);
- if(GetPVarInt(i, "HausKey") >0)
- {
- format(string, sizeof(string), "[Stromkosten :- %d $] [Wasserkosten: - %d $]",geld1,geld2);
- SendClientMessage(i,COLOR_LIGHTBLUE,string);
- }
- if(GetPVarInt(i, "VIP") == 1)
- {
- SendClientMessage(i,COLOR_LIGHTBLUE,"Du bekommst einen VIP zuschlag von 500$");
- }
- SendClientMessage(i,COLOR_WEISS, "=========================================================");
- //GivePlayerMoney(i,geld);
- SetPVarInt(i, "Bank",GetPVarInt(i,"Bank")+geld);
- SetPVarInt(i, "Bank",GetPVarInt(i,"Bank")-geld1);
- SetPVarInt(i, "Bank",GetPVarInt(i,"Bank")-geld2);
- GivePlayerMoney(i,-GetPVarInt(i,"Phonek"));
- GameTextForPlayer(i, "~g~PayDay", 5000, 1);
- SetPVarInt(i, "Respektpunkte", GetPVarInt(i, "Respektpunkte")+1);//Hier wird zu der Variable "Repektpunkte" 1 dazu gerechnet.
- SetPVarInt(i, "Phonek", 0);
- if(GetPVarInt(i, "JobZeit") >= 1)
- {
- SetPVarInt(i, "JobZeit", GetPVarInt(i, "JobZeit")-1);
- }
- if(GetPVarInt(i, "VIP") == 1)
- {
- GivePlayerMoney(i,500);
- SetPVarInt(i, "Respektpunkte", GetPVarInt(i, "Respektpunkte")+1);
- }
- if(GetPVarInt(i,"Wanted")>=1)
- {
- SetPVarInt(i, "Wanted",GetPVarInt(i, "Wanted")-1);
- }
- return 1;
- }
- else//Wenn er noch keine 60min. gespielt hat, ...
- {
- SetPVarInt(i, "ZeitSeitPD", GetPVarInt(i, "ZeitSeitPD")+1); //... wird zu der Variable "ZeitSeitPD" 1 dazugerechnet
- SetPVarInt(i, "spielzeit",GetPVarInt(i,"spielzeit")+1);
- }
- }
- if(GetPVarInt(i, "KnastZeit") >= 1)
- {
- SetPVarInt(i, "KnastZeit",GetPVarInt(i, "KnastZeit")-1);
- if(GetPVarInt(i, "KnastZeit") == 0)
- {
- SetPVarInt(i, "KnastID",0);
- Spawn(i);
- }
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment