command help
#1

it there a possible way i can make command for a car to added not sure what to put so player can do it any help

eg
/bullet
spawns a bullet
Reply
#2

add this into your command
pawn Код:
new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,Float:x,Float:y,Float:z);
    new car1[MAX_PLAYERS];
    car1[playerid] = CreateVehicle(541,Float:x,Float:y,Float:z,100.0,1,1,10);
    PutPlayerInVehicle(playerid,car1[playerid],0);
Reply
#3

You can always use the command from fsdebug.
Код:
/v [vehiclename/id]
Reply
#4

Quote:
Originally Posted by Kitten
Посмотреть сообщение
add this into your command
pawn Код:
new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,Float:x,Float:y,Float:z);
    new car1[MAX_PLAYERS];
    car1[playerid] = CreateVehicle(541,Float:x,Float:y,Float:z,100.0,1,1,10);
    PutPlayerInVehicle(playerid,car1[playerid],0);
PWNED !

trapstar, Just do:
pawn Код:
// In top of your Script
new BULLET[ MAX_PLAYERS ];

// The Command
CMD:bullet( playerid )
{
    new Float: Pos[ 4 ];
    GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
    GetPlayerFacingAngle( playerid, Pos[ 3 ] );
    if( BULLET[ playerid ] > 0 )
    {
        if( GetPlayerVehicleID( playerid ) == BULLET[ playerid ] ) return SendClientMessage( playerid, info, "You are already sitting on your personal {FFFFFF}Bullet{4077F7}!" );
        if( IsPlayerInAnyVehicle( playerid ) ) RemovePlayerFromVehicle( playerid );
        LinkVehicleToInterior( BULLET[ playerid ], GetPlayerInterior( playerid ) );
        SetVehicleVirtualWorld( BULLET[ playerid ], GetPlayerVirtualWorld( playerid ) );
        PutPlayerInVehicle( playerid, BULLET[ playerid ], 0 );
        SetVehiclePos( BULLET[ playerid ], Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
        SetVehicleZAngle( BULLET[ playerid ], Pos[ 3 ] );
        SendClientMessage( playerid, info, "Personal {FFFFFF}Bullet {4077F7}called!" );
    }
    else
    {
        if( IsPlayerInAnyVehicle( playerid ) ) RemovePlayerFromVehicle( playerid );
        BULLET[ playerid ] = CreateVehicle( 522, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], Pos[ 3 ], 75, 3, 240 );
        LinkVehicleToInterior( BULLET[ playerid ], GetPlayerInterior( playerid ) );
        SetVehicleVirtualWorld( BULLET[ playerid ], GetPlayerVirtualWorld( playerid ) );
        PutPlayerInVehicle( playerid, BULLET[ playerid ], 0 );
        SendClientMessage( playerid, info, "Personal {FFFFFF}Bullet {4077F7}created!" );
        foreach(Player, i)if( IsPlayerConnected( i ) && i != playerid ) SetVehicleParamsForPlayer( BULLET[ playerid ], i, 0, 1 );
    }
    return ( 1 );
}
And now the command create a Bullet Per Player, Oh yeah... Put:
pawn Код:
DestroyVehicle( BULLET[ playerid ] );
At OnPlayerDisconnect...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)