Emmyson172 3 Odesláno: 29. Březen, 2015 Share Odesláno: 29. Březen, 2015 Potreboval by som niečo takéto: Hráč zadá príkaz /cp a náhodne napr. z 5 CP mu ukáže 1 Link to comment Share on other sites More sharing options...
0 Hrb™ 48 Odesláno: 29. Březen, 2015 Share Odesláno: 29. Březen, 2015 (upraveno) new r = random(5); switch(r) { case 0: SetPlayerChe... case 1: SetPlayerChe... case 2: SetPlayerChe... case 3: SetPlayerChe... case 4: SetPlayerChe... } Edited 29. Březen, 2015 by Hrb™ Link to comment Share on other sites More sharing options...
0 vladasavel 26 Odesláno: 29. Březen, 2015 Share Odesláno: 29. Březen, 2015 a nebo new Float: nahodnycp[][4] ={ { x,y,z}, { x,y,z}, { x,y,z}, { x,y,z} };case 1: { new rand = random(sizeof(nahodnycp)); SetPlayerCheckpoint(playerid,nahodnycp[rand][0],nyhodnycp[rand][1],nahodnycp[rand][2],nahodnycp[rand][3]); } Link to comment Share on other sites More sharing options...
0 Emmyson172 3 Odesláno: 29. Březen, 2015 Author Share Odesláno: 29. Březen, 2015 (upraveno) C:\Users\Maroš\Desktop\TZ.pwn(266) : error 003: declaration of a local variable must appear in a compound block C:\Users\Maroš\Desktop\TZ.pwn(266) : error 017: undefined symbol "r" C:\Users\Maroš\Desktop\TZ.pwn(267) : error 017: undefined symbol "r" 266 new r = random(2); 267 switch® Edited 29. Březen, 2015 by Emmyson172 Link to comment Share on other sites More sharing options...
0 CalvinC 4 Odesláno: 29. Březen, 2015 Share Odesláno: 29. Březen, 2015 Stačí, keď použiješ toto: switch(random(5)) { case 0: SetPlayerChe... case 1: SetPlayerChe... case 2: SetPlayerChe... case 3: SetPlayerChe... case 4: SetPlayerChe... } Link to comment Share on other sites More sharing options...
Dotaz
Emmyson172 3
Potreboval by som niečo takéto:
Hráč zadá príkaz /cp a náhodne napr. z 5 CP mu ukáže 1
Link to comment
Share on other sites
4 odpovědí na tuto otázku
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