command /create [name car]
#2

pawn Код:
COMMAND:car(playerid, params[])
{
    new string[34];
    if(sscanf(params, "s[34]",string)) return SendUsageMessage(playerid, "/car [Vehicle Name]");
    new vehicle = GetVehicleModelIDFromName(tmp);
    if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, l_red, "That vehicle name was not found");
    new Float:a;
    GetPlayerFacingAngle(playerid, a);
    GetPlayerPos(playerid, x, y, z);
    if(IsPlayerInAnyVehicle(playerid) == 1)
    {
        GetXYInFrontOfPlayer(playerid, x, y, 8);
    }
    else
    {
        GetXYInFrontOfPlayer(playerid, x, y, 5);
    }
    new PlayersVehicle = CreateVehicle(vehicle, x, y, z, a+90, -1, -1, -1);
    LinkVehicleToInterior(PlayersVehicle, GetPlayerInterior(playerid));
    format(String, sizeof(String), "You have spawned a %s", aVehicleNames[vehicle - 400]);
    SendClientMessage(playerid, l_green, String);
    return 1;
}
maybe this? idk.
Reply


Messages In This Thread
command /create [name car] - by CrashCar - 16.04.2015, 03:22
Re: command /create [name car] - by The__ - 16.04.2015, 03:37
Respuesta: Re: command /create [name car] - by CrashCar - 16.04.2015, 03:50
Re: command /create [name car] - by The__ - 16.04.2015, 03:55
Re: command /create [name car] - by Crayder - 16.04.2015, 04:06
Respuesta: command /create [name car] - by JuanStone - 16.04.2015, 04:10

Forum Jump:


Users browsing this thread: 1 Guest(s)