- 0
Job goal
-
Similar Content
-
- 0 replies
- 102 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
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
Edited by TheGodfather2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now