All Can Spwan Vehicles Help Me
#2

Try this

PHP код:
CMD:v(playeridparams[]) 

    new 
Vehicle[32], VehicleIDColorOneColorTwo
    
PlayerInfov[playerid][pCanSpawnVehicle] = true
    if(
PlayerInfo[playerid][pRank] >= 1) return SendClientMessage(playeridCOLOR_RED"You are not admin to use this command");
    if(
sscanf(params"s[32]D(1)D(1)"VehicleColorOneColorTwo)) 
    { 
        
PlayerInfov[playerid][pCanSpawnVehicle] = true
        
SendClientMessage(playeridCOLOR_LIGHTYELLOW"[USAGE]: /v[Vehiclename/Vehicleid] [Color 1 (optional)] [Color 2 (optional)]"); 
        
SendClientMessage(playeridCOLOR_LIGHTYELLOW"[USAGE]: Like /v Turismo , /v Elegy /v Nrg /v 522"); 
        return 
1
    } 
    if(
PlayerInfov[playerid][pCanSpawnVehicle]) 
    { 
        
VehicleID GetVehicleModelIDFromName(Vehicle); 
        if(
VehicleID != 425 && VehicleID != 432 && VehicleID != 447 && 
           
VehicleID != 430 && VehicleID != 417 && VehicleID != 435 && 
           
VehicleID != 446 && VehicleID != 449 && VehicleID != 450 && 
           
VehicleID != 452 && VehicleID != 453 && VehicleID != 454 && 
             
VehicleID != 460 && VehicleID != 464 && VehicleID != 465 && 
             
VehicleID != 469 && VehicleID != 472 && VehicleID != 473 && 
           
VehicleID != 476 && VehicleID != 484 && VehicleID != 487 && 
           
VehicleID != 488 && VehicleID != 493 && VehicleID != 497 && 
           
VehicleID != 501 && VehicleID != 511 && VehicleID != 512 && 
           
VehicleID != 513 && VehicleID != 519 && VehicleID != 520 && 
           
VehicleID != 537 && VehicleID != 538 && VehicleID != 548 && 
           
VehicleID != 553 && VehicleID != 563 && VehicleID != 564 && 
           
VehicleID != 569 && VehicleID != 570 && VehicleID != 577 && 
           
VehicleID != 584 && VehicleID != 590 && VehicleID != 591 && 
           
VehicleID != 592 && VehicleID != 593 && VehicleID != 594 && 
           
VehicleID != 595 && VehicleID != 606 && VehicleID != 607 && 
           
VehicleID != 608 && VehicleID != 610 && VehicleID != 611) { 
            if(
VehicleID == -
            { 
                
VehicleID strval(Vehicle); 
                if(
VehicleID 400 || VehicleID 611 
                { 
                    return 
SendClientMessage(playeridCOLOR_RED"You entered an invalid vehiclename!"); 
                } 
            } 
            
GetPlayerPos(playeridpXpYpZ); 
            
GetPlayerFacingAngle(playeridpAngle); 
            
DestroyVehicle(PlayerInfov[playerid][pSpawnVehicle]); 
            
PlayerInfov[playerid][pSpawnVehicle] = CreateVehicle(VehicleIDpXpYpZ+2.0pAngleColorOneColorTwo, -1); 
            
LinkVehicleToInterior(PlayerInfov[playerid][pSpawnVehicle], GetPlayerInterior(playerid)); 
            
PutPlayerInVehicle(playeridPlayerInfov[playerid][pSpawnVehicle], 0); 
            
SendClientMessage(playeridCOLOR_RED"You succesfully spawned this vehicle!"); 
        } else { 
            
SendClientMessage(playeridCOLOR_RED"You are not allowed to spawn this vehicle!!"); 
        } 
    } else { 
        
SendClientMessage(playeridCOLOR_RED"You can not spawn vehicles in this zone!"); 
    } 
    return 
1

Reply


Messages In This Thread
All Can Spwan Vehicles Help Me - by BlazeOfGlory - 18.02.2016, 10:07
Re: All Can Spwan Vehicles Help Me - by TuFF12 - 18.02.2016, 10:15
Re: All Can Spwan Vehicles Help Me - by Amunra - 18.02.2016, 10:18
Re: All Can Spwan Vehicles Help Me - by BlazeOfGlory - 18.02.2016, 10:19
Re: All Can Spwan Vehicles Help Me - by TuFF12 - 18.02.2016, 10:23
Re: All Can Spwan Vehicles Help Me - by Amunra - 18.02.2016, 10:25
Re: All Can Spwan Vehicles Help Me - by BlazeOfGlory - 18.02.2016, 10:28
Re: All Can Spwan Vehicles Help Me - by Amunra - 18.02.2016, 10:32
Re: All Can Spwan Vehicles Help Me - by BlazeOfGlory - 18.02.2016, 10:47
Re: All Can Spwan Vehicles Help Me - by Amunra - 18.02.2016, 10:55

Forum Jump:


Users browsing this thread: 2 Guest(s)