- 0
Simplificare prin functie, ceva ce e usor...
-
Similar Content
-
- 1 reply
- 312 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
[emy]
switch (playerVariables[playerid][pPrayers]) { case 5: { SendClientMessage(playerid, -1, "Case 5"); SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 10 times.", praypoints+1); } case 10: { SendClientMessage(playerid, -1, "Case 10"); SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 15 times.", praypoints+1); } case 15: { SendClientMessage(playerid, -1, "Case 15"); SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 30 times.", praypoints+1); } case 30: { SendClientMessage(playerid, -1, "Case 30"); SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 35 times.", praypoints+1); } case 35: { SendClientMessage(playerid, -1, "Case 35"); SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at 50 times.", praypoints+1); } }Cum as putea face ca in loc de a pune mesajul asta de fiecare data sa pot sa scriu
SCMf(playerid, -1, "{28A700}PRAY >> {FFFFFF}You have prayed %d times until now. {FF5D00}Next reward at %d times.", praypoints+1, getPrayPoints(playerid)));Adica practic, cum sa arate functia mea.. getPrayPoints... Vreau ca atunci cand mai are 5 sa scrie ca au mai ramas 5... cand se fac 35 de exemplu si eu am 31 de puncte sa imi scrie ca mai trebuie de 4 ori sa repet actiunea...
2 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