command help
#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


Messages In This Thread
command help - by trapstar2020 - 25.09.2011, 04:39
Re: command help - by Kitten - 25.09.2011, 04:42
Re: command help - by .:Kaos:. - 25.09.2011, 06:07
Re: command help - by aRoach - 25.09.2011, 06:36

Forum Jump:


Users browsing this thread: 1 Guest(s)