29/03/2019

Code gắn object trên xe máy



Lưu ý

Đoạn code này mình tìm được ở trên mạng. Vì chưa có thời gian để kiểm tra nhưng xem qua cấu trúc code khá đơn giản nên mọi người có thể tham khảo. Mục đích chia sẽ code này là để THAM KHẢO. Nếu gặp vấn đề gì về code này bọn mình không hỗ trợ tốt được.
Nguồn: Pawnoinfo

Pawno Code


stock BikesInstall(vehicleid)
{
    new 
bikes_acc_onebikes_acc_twobikes_acc_threebikes_acc_one_copybikes_acc_three_copy;
    
bikes_acc_one CreateDynamicObject(1112,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0); // Крылья
    
bikes_acc_one_copy CreateDynamicObject(1112,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0); // Крылья
    
bikes_acc_two CreateDynamicObject(1254,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0); // Череп
    
bikes_acc_three CreateDynamicObject(1575,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0); // Мешки 1575
    
bikes_acc_three_copy CreateDynamicObject(1575,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0); // Мешки 1575
  
    
switch(GetVehicleModel(vehicleid))
    {
        case 
461:
        {
            
AttachDynamicObjectToVehicle(bikes_acc_onevehicleid0.1890.2990.1843.90092.7000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_one_copyvehicleid, -0.1600.3280.3630.000, -79.9990.000);
            
AttachDynamicObjectToVehicle(bikes_acc_twovehicleid0.0000.0580.469, -82.4000.0000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_threevehicleid0.112, -0.9090.1930.00079.6000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_three_copyvehicleid, -0.109, -0.9000.2361.999, -82.5997.399);
            return 
1;
        }
        case 
463:
        {
            
AttachDynamicObjectToVehicle(bikes_acc_onevehicleid, -0.1860.3270.4379.599, -83.30020.399);
            
AttachDynamicObjectToVehicle(bikes_acc_one_copyvehicleid0.1790.3690.29410.600105.300, -14.499);
            
AttachDynamicObjectToVehicle(bikes_acc_twovehicleid0.0000.0950.374, -54.2990.0000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_threevehicleid, -0.136, -0.9390.1160.000, -49.5000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_three_copyvehicleid0.122, -0.8990.0904.49966.9990.000);
            return 
1;
        }
        case 
521:
        {
            
AttachDynamicObjectToVehicle(bikes_acc_onevehicleid, -0.1900.2970.4990.100, -90.29911.799);
            
AttachDynamicObjectToVehicle(bikes_acc_one_copyvehicleid0.1350.3180.4090.000107.399, -4.199);
            
AttachDynamicObjectToVehicle(bikes_acc_twovehicleid0.000, -0.8250.477, -90.1990.0000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_threevehicleid, -0.153, -0.8300.2790.000, -74.6990.000);
            
AttachDynamicObjectToVehicle(bikes_acc_three_copyvehicleid0.188, -0.7700.3000.00077.0990.000);
            return 
1;
        }
        case 
522:
        {
            
AttachDynamicObjectToVehicle(bikes_acc_twovehicleid, -0.2070.2250.0226.7990.000, -91.299);
            
AttachDynamicObjectToVehicle(bikes_acc_twovehicleid0.1990.249, -0.0017.3990.00091.200);
            
AttachDynamicObjectToVehicle(bikes_acc_threevehicleid0.106, -0.9000.3860.00071.8990.000);
            
AttachDynamicObjectToVehicle(bikes_acc_three_copyvehicleid, -0.122, -0.8400.3800.000, -65.9000.000);
            
AttachDynamicObjectToVehicle(bikes_acc_onevehicleid, -0.1700.3300.5382.500, -87.9996.899);
            
AttachDynamicObjectToVehicle(bikes_acc_one_copyvehicleid0.1820.3370.422, -0.49996.799, -11.199);
            return 
1;
        }
        case 
468:
        {
            
AttachDynamicObjectToVehicle(bikes_acc_threevehicleid0.248, -0.8260.190, -90.499, -92.200, -4.999);
            
AttachDynamicObjectToVehicle(bikes_acc_three_copyvehicleid, -0.276, -0.8400.19797.6990.00093.900);
            return 
1;
        }
        default:
        {
            
DestroyDynamicObject(bikes_acc_three_copy);
            
DestroyDynamicObject(bikes_acc_three);
            
DestroyDynamicObject(bikes_acc_two);
            
DestroyDynamicObject(bikes_acc_one_copy);
            
DestroyDynamicObject(bikes_acc_one);
        }
    }
    return 
true;
}  

Lưu ý

» Không chửi tục, nói bậy, quảng cáo thông qua khung bình luận.
» Không spam liên kết, chia sẻ các liên kết không liên quan đến bài Blog.
» Không xuyên tạc, bôi nhọ tổ chức hay cá nhân nào.
» Mọi bình luận sai nội quy sẽ bị xóa mà không cần báo trước.


Emoticon
Parser
😊
😉
😀
😁
😎
😍
😜
😑
😇
💖
😯
😱
😭
👍
🍻