[Ajuda] Funзхes para concessionбria.
#1

Oi gente '-'.

Entгo, estou criando um sistema de concessionбria, mas estou com uma dъvida e preciso da ajuda de vocкs.
Criei 2 Callbacks, para pegar o Nome e o Preзo do veнculo que defini nela, mas, nгo tб pegando, digo, 'printando' o nome do veнculo, e o preco, sempre 'printa': 1.

Aн vai o CODE.

PHP код:
stock GetVehicleNome(playerid)
{
    new
        
vid GetPlayerVehicleID(playerid),
        
dreehStr[35]
    ;
    switch(
GetVehicleModel(vid))
     {
         case 
400format(dreehStrsizeof(dreehStr), "Landstalker");
         case 
401format(dreehStrsizeof(dreehStr), "Bravura");
         case 
402format(dreehStrsizeof(dreehStr), "Buffalo");
         case 
403format(dreehStrsizeof(dreehStr), "Linerunner");
         case 
404format(dreehStrsizeof(dreehStr), "Pereniel");
         case 
405format(dreehStrsizeof(dreehStr), "Sentinel");
         case 
409format(dreehStrsizeof(dreehStr), "Stretch");
         case 
410format(dreehStrsizeof(dreehStr), "Manana");
         case 
411format(dreehStrsizeof(dreehStr), "Infernus");
         case 
412format(dreehStrsizeof(dreehStr), "Voodoo");
         case 
413format(dreehStrsizeof(dreehStr), "Pony");
         case 
415format(dreehStrsizeof(dreehStr), "Cheetah");
         case 
418format(dreehStrsizeof(dreehStr), "Moonbeam");
         case 
419format(dreehStrsizeof(dreehStr), "Esperanto");
         case 
420format(dreehStrsizeof(dreehStr), "Taxi");
         case 
421format(dreehStrsizeof(dreehStr), "Washington");
         case 
422format(dreehStrsizeof(dreehStr), "Bobcat");
         case 
424format(dreehStrsizeof(dreehStr), "BF Injection");
         case 
426format(dreehStrsizeof(dreehStr), "Premier");
         case 
428format(dreehStrsizeof(dreehStr), "Securicar");
         case 
429format(dreehStrsizeof(dreehStr), "Banshee");
         case 
436format(dreehStrsizeof(dreehStr), "Previon");
         case 
439format(dreehStrsizeof(dreehStr), "Stallion");
         case 
440format(dreehStrsizeof(dreehStr), "Rumpo");
         case 
442format(dreehStrsizeof(dreehStr), "Romero");
         case 
445format(dreehStrsizeof(dreehStr), "Admiral");
         case 
451format(dreehStrsizeof(dreehStr), "Turismo");
         case 
458format(dreehStrsizeof(dreehStr), "Solair");
         case 
459format(dreehStrsizeof(dreehStr), "Berkley's RC Van");
         case 
461format(dreehStrsizeof(dreehStr), "PCJ-600");
         case 
462format(dreehStrsizeof(dreehStr), "Faggio");
         case 
463format(dreehStrsizeof(dreehStr), "Freeway");
         case 
466format(dreehStrsizeof(dreehStr), "Glendale");
         case 
467format(dreehStrsizeof(dreehStr), "Oceanic");
         case 
468format(dreehStrsizeof(dreehStr), "Sanchez");
         case 
474format(dreehStrsizeof(dreehStr), "Hermes");
         case 
475format(dreehStrsizeof(dreehStr), "Sabre");
         case 
477format(dreehStrsizeof(dreehStr), "ZR-350");
         case 
478format(dreehStrsizeof(dreehStr), "Walton");
         case 
479format(dreehStrsizeof(dreehStr), "Regina");
         case 
480format(dreehStrsizeof(dreehStr), "Comet");
         case 
481format(dreehStrsizeof(dreehStr), "BMX");
         case 
482format(dreehStrsizeof(dreehStr), "Burrito");
         case 
483format(dreehStrsizeof(dreehStr), "Camper");
         case 
489format(dreehStrsizeof(dreehStr), "Rancher");
         case 
491format(dreehStrsizeof(dreehStr), "Virgo");
         case 
492format(dreehStrsizeof(dreehStr), "Greenwood");
         case 
495format(dreehStrsizeof(dreehStr), "Sandking");
         case 
496format(dreehStrsizeof(dreehStr), "Blista Compact");
         case 
498format(dreehStrsizeof(dreehStr), "Boxville");
         case 
500format(dreehStrsizeof(dreehStr), "Mesa");
         case 
506format(dreehStrsizeof(dreehStr), "Super GT");
         case 
507format(dreehStrsizeof(dreehStr), "Elegant");
         case 
509format(dreehStrsizeof(dreehStr), "Bike");
         case 
510format(dreehStrsizeof(dreehStr), "Mountain Bike");
         case 
514format(dreehStrsizeof(dreehStr), "Tanker");
         case 
515format(dreehStrsizeof(dreehStr), "RoadTrain");
         case 
516format(dreehStrsizeof(dreehStr), "Nebula");
         case 
517format(dreehStrsizeof(dreehStr), "Majestic");
         case 
518format(dreehStrsizeof(dreehStr), "Buccaneer");
         case 
521format(dreehStrsizeof(dreehStr), "FCR-900");
         case 
522format(dreehStrsizeof(dreehStr), "NRG-500");
         case 
525format(dreehStrsizeof(dreehStr), "Tow Truck");
         case 
526format(dreehStrsizeof(dreehStr), "Fortune");
         case 
527format(dreehStrsizeof(dreehStr), "Cadrona");
         case 
529format(dreehStrsizeof(dreehStr), "Willard");
         case 
533format(dreehStrsizeof(dreehStr), "Feltzer");
         case 
534format(dreehStrsizeof(dreehStr), "Remington");
         case 
535format(dreehStrsizeof(dreehStr), "Slamvan");
         case 
536format(dreehStrsizeof(dreehStr), "Blade");
         case 
540format(dreehStrsizeof(dreehStr), "Vincent");
         case 
541format(dreehStrsizeof(dreehStr), "Bullet");
         case 
542format(dreehStrsizeof(dreehStr), "Clover");
         case 
543format(dreehStrsizeof(dreehStr), "Sadler");
         case 
545format(dreehStrsizeof(dreehStr), "Hustler");
         case 
546format(dreehStrsizeof(dreehStr), "Intruder");
         case 
547format(dreehStrsizeof(dreehStr), "Primo");
         case 
549format(dreehStrsizeof(dreehStr), "Tampa");
         case 
550format(dreehStrsizeof(dreehStr), "Sunrise");
         case 
551format(dreehStrsizeof(dreehStr), "Merit");
         case 
554format(dreehStrsizeof(dreehStr), "Yosemite");
         case 
555format(dreehStrsizeof(dreehStr), "Windsor");
         case 
558format(dreehStrsizeof(dreehStr), "Uranus");
         case 
559format(dreehStrsizeof(dreehStr), "Jester");
         case 
560format(dreehStrsizeof(dreehStr), "Jester");
         case 
561format(dreehStrsizeof(dreehStr), "Stratum");
         case 
562format(dreehStrsizeof(dreehStr), "Elegy");
         case 
565format(dreehStrsizeof(dreehStr), "Flash");
         case 
566format(dreehStrsizeof(dreehStr), "Tahoma");
         case 
567format(dreehStrsizeof(dreehStr), "Savanna");
         case 
575format(dreehStrsizeof(dreehStr), "Broadway");
         case 
576format(dreehStrsizeof(dreehStr), "Tornado");
         case 
579format(dreehStrsizeof(dreehStr), "Huntley");
         case 
580format(dreehStrsizeof(dreehStr), "Stafford");
         case 
581format(dreehStrsizeof(dreehStr), "BF-400");
         case 
585format(dreehStrsizeof(dreehStr), "Emperor");
         case 
586format(dreehStrsizeof(dreehStr), "Wayfarer");
         case 
587format(dreehStrsizeof(dreehStr), "Euros");
         case 
589format(dreehStrsizeof(dreehStr), "Club");
         case 
600format(dreehStrsizeof(dreehStr), "Picador");
         case 
602format(dreehStrsizeof(dreehStr), "Alpha");
         case 
603format(dreehStrsizeof(dreehStr), "Phoenix");
         case 
604format(dreehStrsizeof(dreehStr), "Glendale");
         case 
255format(dreehStrsizeof(dreehStr), "Nenhum");
     }
    return 
1;

PHP код:
stock GetVehiclePreco(playerid)
{
    new
        
vid GetPlayerVehicleID(playerid),
        
dreehStr[7]
    ;
    switch(
GetVehicleModel(vid))
     {
         case 
400format(dreehStrsizeof(dreehStr), "40000");
         case 
401format(dreehStrsizeof(dreehStr), "15000");
         case 
402format(dreehStrsizeof(dreehStr), "50000");
         case 
403format(dreehStrsizeof(dreehStr), "25000");
         case 
404format(dreehStrsizeof(dreehStr), "12000");
         case 
405format(dreehStrsizeof(dreehStr), "45000");
         case 
409format(dreehStrsizeof(dreehStr), "110000");
         case 
410format(dreehStrsizeof(dreehStr), "10000");
         case 
411format(dreehStrsizeof(dreehStr), "16000");
         case 
412format(dreehStrsizeof(dreehStr), "23000");
         case 
413format(dreehStrsizeof(dreehStr), "30000");
         case 
415format(dreehStrsizeof(dreehStr), "135000");
         case 
418format(dreehStrsizeof(dreehStr), "11000");
         case 
419format(dreehStrsizeof(dreehStr), "13500");
         case 
420format(dreehStrsizeof(dreehStr), "11000");
         case 
421format(dreehStrsizeof(dreehStr), "36000");
         case 
422format(dreehStrsizeof(dreehStr), "18000");
         case 
424format(dreehStrsizeof(dreehStr), "14000");
         case 
426format(dreehStrsizeof(dreehStr), "30000");
         case 
428format(dreehStrsizeof(dreehStr), "90000");
         case 
429format(dreehStrsizeof(dreehStr), "75000");
         case 
436format(dreehStrsizeof(dreehStr), "12000");
         case 
439format(dreehStrsizeof(dreehStr), "14500");
         case 
440format(dreehStrsizeof(dreehStr), "35000");
         case 
442format(dreehStrsizeof(dreehStr), "25000");
         case 
445format(dreehStrsizeof(dreehStr), "28000");
         case 
451format(dreehStrsizeof(dreehStr), "150000");
         case 
458format(dreehStrsizeof(dreehStr), "13500");
         case 
459format(dreehStrsizeof(dreehStr), "23000");
         case 
461format(dreehStrsizeof(dreehStr), "28000");
         case 
462format(dreehStrsizeof(dreehStr), "7000");
         case 
463format(dreehStrsizeof(dreehStr), "12000");
         case 
466format(dreehStrsizeof(dreehStr), "22500");
         case 
467format(dreehStrsizeof(dreehStr), "22500");
         case 
468format(dreehStrsizeof(dreehStr), "17000");
         case 
474format(dreehStrsizeof(dreehStr), "14500");
         case 
475format(dreehStrsizeof(dreehStr), "24000");
         case 
477format(dreehStrsizeof(dreehStr), "78000");
         case 
478format(dreehStrsizeof(dreehStr), "23000");
         case 
479format(dreehStrsizeof(dreehStr), "23000");
         case 
480format(dreehStrsizeof(dreehStr), "105000");
         case 
481format(dreehStrsizeof(dreehStr), "5000");
         case 
482format(dreehStrsizeof(dreehStr), "30000");
         case 
483format(dreehStrsizeof(dreehStr), "15000");
         case 
489format(dreehStrsizeof(dreehStr), "43000");
         case 
491format(dreehStrsizeof(dreehStr), "29000");
         case 
492format(dreehStrsizeof(dreehStr), "26000");
         case 
495format(dreehStrsizeof(dreehStr), "45000");
         case 
496format(dreehStrsizeof(dreehStr), "19000");
         case 
498format(dreehStrsizeof(dreehStr), "45000");
         case 
500format(dreehStrsizeof(dreehStr), "27000");
         case 
506format(dreehStrsizeof(dreehStr), "125000");
         case 
507format(dreehStrsizeof(dreehStr), "30000");
         case 
509format(dreehStrsizeof(dreehStr), "1500");
         case 
510format(dreehStrsizeof(dreehStr), "8000");
         case 
514format(dreehStrsizeof(dreehStr), "35000");
         case 
515format(dreehStrsizeof(dreehStr), "45000");
         case 
516format(dreehStrsizeof(dreehStr), "18000");
         case 
517format(dreehStrsizeof(dreehStr), "20000");
         case 
518format(dreehStrsizeof(dreehStr), "23000");
         case 
521format(dreehStrsizeof(dreehStr), "45000");
         case 
522format(dreehStrsizeof(dreehStr), "105000");
         case 
525format(dreehStrsizeof(dreehStr), "11000");
         case 
526format(dreehStrsizeof(dreehStr), "12000");
         case 
527format(dreehStrsizeof(dreehStr), "11000");
         case 
529format(dreehStrsizeof(dreehStr), "14000");
         case 
533format(dreehStrsizeof(dreehStr), "35000");
         case 
534format(dreehStrsizeof(dreehStr), "20000");
         case 
535format(dreehStrsizeof(dreehStr), "35000");
         case 
536format(dreehStrsizeof(dreehStr), "24000");
         case 
540format(dreehStrsizeof(dreehStr), "28000");
         case 
541format(dreehStrsizeof(dreehStr), "150000");
         case 
542format(dreehStrsizeof(dreehStr), "18000");
         case 
543format(dreehStrsizeof(dreehStr), "18000");
         case 
545format(dreehStrsizeof(dreehStr), "35000");
         case 
546format(dreehStrsizeof(dreehStr), "17000");
         case 
547format(dreehStrsizeof(dreehStr), "16000");
         case 
549format(dreehStrsizeof(dreehStr), "16000");
         case 
550format(dreehStrsizeof(dreehStr), "30000");
         case 
551format(dreehStrsizeof(dreehStr), "36000");
         case 
554format(dreehStrsizeof(dreehStr), "20000");
         case 
555format(dreehStrsizeof(dreehStr), "60000");
         case 
558format(dreehStrsizeof(dreehStr), "65000");
         case 
559format(dreehStrsizeof(dreehStr), "70000");
         case 
560format(dreehStrsizeof(dreehStr), "105000");
         case 
561format(dreehStrsizeof(dreehStr), "50000");
         case 
562format(dreehStrsizeof(dreehStr), "86000");
         case 
565format(dreehStrsizeof(dreehStr), "47000");
         case 
566format(dreehStrsizeof(dreehStr), "27000");
         case 
567format(dreehStrsizeof(dreehStr), "32000");
         case 
575format(dreehStrsizeof(dreehStr), "22000");
         case 
576format(dreehStrsizeof(dreehStr), "18500");
         case 
579format(dreehStrsizeof(dreehStr), "38000");
         case 
580format(dreehStrsizeof(dreehStr), "45000");
         case 
581format(dreehStrsizeof(dreehStr), "22500");
         case 
585format(dreehStrsizeof(dreehStr), "15500");
         case 
586format(dreehStrsizeof(dreehStr), "23000");
         case 
587format(dreehStrsizeof(dreehStr), "22000");
         case 
589format(dreehStrsizeof(dreehStr), "16500");
         case 
600format(dreehStrsizeof(dreehStr), "13500");
         case 
602format(dreehStrsizeof(dreehStr), "28500");
         case 
603format(dreehStrsizeof(dreehStr), "50000");
         case 
604format(dreehStrsizeof(dreehStr), "22500");
         case 
255format(dreehStrsizeof(dreehStr), "000");
     }
    return 
1;

Estou usando dessa maneira para teste:

PHP код:
printf("Nome do Carro: %s | Preзo do Carro: %d"GetVehicleNome(playerid), GetVehiclePreco(playerid)); 
Mas, isto me 'printa'

PHP код:
Nome do Carro:   | Preзo do Carro
Se souberem onde estб o 'erro' e como solucionar, fico grato, desde jб, obrigado.
Reply


Messages In This Thread
[Ajuda] Funзхes para concessionбria. - by DreeH - 11.10.2011, 01:42
Re: [Ajuda] Funзхes para concessionбria. - by Macintosh - 11.10.2011, 01:44
Re: [Ajuda] Funзхes para concessionбria. - by DreeH - 11.10.2011, 01:47
Re: [Ajuda] Funзхes para concessionбria. - by Macintosh - 11.10.2011, 01:49
Re: [Ajuda] Funзхes para concessionбria. - by WLSF - 11.10.2011, 01:51
Re: [Ajuda] Funзхes para concessionбria. - by DreeH - 11.10.2011, 01:52
Re: [Ajuda] Funзхes para concessionбria. - by Macintosh - 11.10.2011, 01:52
Re: [Ajuda] Funзхes para concessionбria. - by Ricop522 - 11.10.2011, 01:55
Re: [Ajuda] Funзхes para concessionбria. - by DreeH - 11.10.2011, 02:04

Forum Jump:


Users browsing this thread: 1 Guest(s)