Way to shorten this? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Way to shorten this? (
/showthread.php?tid=185767)
Way to shorten this? -
Kitten - 26.10.2010
Solved
Re: Way to shorten this? -
Calgon - 26.10.2010
You do realize you can have more than 1 line of code per if statement, right?
pawn Код:
switch(GetPlayerScore(killerid)) {
case 1: {
TextDrawSetString(EXPNUMB[killerid],"~b~l");
}
case 2: {
TextDrawSetString(EXPNUMB[killerid],"~b~ll");
TextDrawSetString(EXPNUMB[killerid],"~b~lll");
}
case 3: {
TextDrawSetString(EXPNUMB[killerid],"~b~llll");
}
case 4: {
TextDrawSetString(EXPNUMB[killerid],"~b~llll");
}
case 5: {
TextDrawSetString(EXPNUMB[killerid],"~b~lllll");
}
}
Re: Way to shorten this? -
Kitten - 26.10.2010
Solved