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...
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...
Link to comment
Share on other sites
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.