Textdraws[EASY QUESTION]
#1

pawn Код:
new vtype[52];
                new vprice;
                if(GetVehicleModel(newcar) == 405){ vtype = "Sentinel"; vprice = 90000; }
                else if(GetVehicleModel(newcar) == 404){ vtype = "Perenail"; vprice = 40000; }
                else if(GetVehicleModel(newcar) == 400){ vtype = "LandStalker"; vprice = 100000; }
                else if(GetVehicleModel(newcar) == 412){ vtype = "Voodoo"; vprice = 70000; }
                else if(GetVehicleModel(newcar) == 418){ vtype = "Moonbeam"; vprice = 75000; }
                else if(GetVehicleModel(newcar) == 421){ vtype = "Washington"; vprice = 120000; }
                else if(GetVehicleModel(newcar) == 426){ vtype = "Premier"; vprice = 50000; }
                else if(GetVehicleModel(newcar) == 445){ vtype = "Admiral"; vprice = 110000; }
                else if(GetVehicleModel(newcar) == 466){ vtype = "Glendale"; vprice = 45000; }
                else if(GetVehicleModel(newcar) == 467){ vtype = "Oceanic"; vprice = 47000; }
                else if(GetVehicleModel(newcar) == 482){ vtype = "Burrito"; vprice = 70000; }
                else if(GetVehicleModel(newcar) == 492){ vtype = "GreenWood"; vprice = 55000; }
                else if(GetVehicleModel(newcar) == 507){ vtype = "Elegant"; vprice = 70000; }
                else if(GetVehicleModel(newcar) == 516){ vtype = "Nebula"; vprice = 75000; }
                else if(GetVehicleModel(newcar) == 529){ vtype = "Williard"; vprice = 65000; }
                else if(GetVehicleModel(newcar) == 536){ vtype = "Blade"; vprice = 50000; }
                else if(GetVehicleModel(newcar) == 541){ vtype = "Bullet"; vprice = 400000; }
                else if(GetVehicleModel(newcar) == 561){ vtype = "Stratum"; vprice = 70000; }
                else if(GetVehicleModel(newcar) == 566){ vtype = "Tahoma"; vprice = 60000; }
                else if(GetVehicleModel(newcar) == 567){ vtype = "Savanna"; vprice = 610000; }
                else if(GetVehicleModel(newcar) == 579){ vtype = "Huntley"; vprice = 100000; }
                else if(GetVehicleModel(newcar) == 580){ vtype = "Stafford"; vprice = 90000; }
                format(string,sizeof(string),"~w~Model:~b~%s~n~~w~Price:$%d",vtype,vprice);
                TextDrawSetString(Textdraw3, string);
                TextDrawShowForPlayer(playerid,Textdraw3);
How do i show ALL the models with prices in TextDraw3?
Reply
#2

BUMP
This is my first BUMP,im sorry but im in hurry and i really need to do it now
Reply
#3

Make a foreach.
Reply
#4

Loop, format, strcat. If prices are static and cannot be changed your can just strcat them in one big string if you cannot write that much text in one line.
Reply
#5

Thanks !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)