car dealership
#1

Hy samp forum!

How i can make car dealership with this include https://sampforum.blast.hk/showthread.php?tid=407045 i know how to make list with this put i dont know how to make this system when I choose like buffalo or something then go -125000 money.

Sorry bad English

Thanks!
Reply
#2

First make notepad called 'cars' on your scripted files on server folder\scriptfiles. and paste that codes on it and save (Actually that's the vehicles id's)
Код:
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541 	
542 	
543 	
544	
545 	
546 	
547 	
548 	
549 	
550 	
551 	
552 	
553 	
554 	
555 	
556 	
557 
558 	
559 	
560 	
561 	
562 	
563 	
564 	
565 	
566 	
567 	
568 	
569 	
570 	
571 	
572 	
573 	
ID 	
574 	
575 	
576 	
577 	
578 	
579 	
580 	
581 	
582 	
583 	
584 	
585 	
586 	
587 	
588 	
589 	
590 	
591 	
592 	
593 	
594 	
595 	
596 	
597 	
598 	
599 	
600 	
601 	
602 	
603 
604 	
605 	
606 	 
607 	
608 	
609 	
610 	
611
here's an example command.
pawn Код:
new cars = mS_INVALID_LISTID;//on the top .
public OnGameModeInit()
{
    cars = LoadModelSelectionMenu("cars.txt");//loading the cars from the notepad we create.
    return 1;
}
CMD:car(playerid, params[])
{
    ShowModelSelectionMenu(playerid, cars, "Select car");//Showing him car menu using mselection file.
    return 1;
}
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(listid == cars)
    {
        if(response)//if he select any car.
        {
            SendClientMessage(playerid, 0xFF0000FF, "You have spawned car for $125,000");//sending message
            new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);//geting his current player who typed the command position
            GivePlayerMoney(playerid,-125000);//Taking 125,000 from his money.
            CreateVehicle(modelid, pos[0] + 2.5, pos[1], pos[2] + 2.5, 0.0, random(128), random(128), -1);//creating vehicle.
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Canceled car selection");
        return 1;
    }
    return 1;
}
Hope you understand something!
Reply
#3

yes,put this take every car 125k put i want sultan like 500k,buffalo 600k infernus 1 mil
Reply
#4

Quote:
Originally Posted by romka
Посмотреть сообщение
yes,put this take every car 125k put i want sultan like 500k,buffalo 600k infernus 1 mil
I don't think you can.
Reply
#5

You can with a more advanced code.
Reply
#6

The thing is, mSelection menus don't show a title below anything, so you can set the price, but you can't see the price of the vehicle in the menu.
Reply
#7

put how i can set the price
Reply
#8

bump
Reply
#9

By using something like that
pawn Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(modelid == 461) //that was just an example change that to your car id
    {
    GivePlayerMoney(playerid,-1000);//change that to your custom price
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/Vehicle_Model_ID_List
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)