- 0
Job goal
-
Similar Content
-
- 1 reply
- 776 views
-
- 0 replies
- 689 views
-
- 0 replies
- 554 views
-
- 0 replies
- 597 views
-
JOB FARMER
By Vallentiin,
- 0 replies
- 574 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
TheGodfather
Salut, as vrea ca dupa restart sa imi puna valoarea pe care a avut-o job goal-ul inainte de restart. Job goal-ul se salveaza bine in baza de date de fiecare data cand un player face job. Doar ca atunci cand pornesc server-ul din nou o sa aiba valoarea 0.
function UpdateJobGoal(update) {
ServerGoal += update;
gString[0] = EOS;
format(gString, 60, "~y~$%s ~w~/ ~r~$%s", ServerGoal >= MAXGOAL ? FormatNumbers(MAXGOAL) : FormatNumbers(ServerGoal), FormatNumbers(MAXGOAL));
TextDrawSetString(GoalTD[0], gString);
if(TerminatJobGoal != 1) {
//goal
gQuery[0] = EOS;
mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `stuff` SET `goal`='%d'", ServerGoal);
mysql_tquery(SQL, gQuery, "", "");
//goal
if(ServerGoal >= MAXGOAL) {
foreach(Player, b) {
new amount, rand = random(30);
switch(rand) {
case 0..10: {
amount = RandomEx(50, 100);
format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Gift Points because the job goal is full.", amount);
SCM(b, 0xF5C738FF, gString);
PlayerInfo[b][pGiftPoints] += amount;
if(PlayerInfo[b][pGiftPoints] >= 500) PlayerInfo[b][pGiftPoints] = 500;
Update(b, pGiftPointsx);
}
case 11..19: {
amount = RandomEx(15, 30);
format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Premium Points because the job goal is full.", amount);
SCM(b, 0xF5C738FF, gString);
PlayerInfo[b][pPremiumPoints] += amount;
Update(b, pPremiumPointsx);
}
default: {
amount = RandomEx(200, 300);
format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Q-Points because the job goal is full.", amount);
SCM(b, 0xF5C738FF, gString);
PlayerInfo[b][pHpoints] += amount;
Update(b, pHpointsx);
}
}
}
TerminatJobGoal = 1;
}
}
return true;
}
GoalTD[0] este definit astfel in Booter.inc
GoalTD[0] = TextDrawCreate(320.281829, 435.829803, "~y~$0~w~ /~g~ $50.000.000");
Goal-ul se salveaza aici: stuff - goal
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.