Closed LDami closed 11 months ago
if(sscanf(params, "s[20]I(-1)I(-1)", model, color1, color2)) { return SCM(playerid, COLOR_SYNTAX, "Usage: /veh [modelid/name] [color1 (optional)] [color2 (optional)]"); }
if(sscanf(params, "s[20]I(-1)I(-1)", model, color1, color2)) { return SCM(playerid, COLOR_SYNTAX, "Usage: /veh [modelid/name] [color1 (optional)] [color2 (optional)]"); }
Hi
Your code snippet is from pawn, it is not relevant in the context of SampSharp and C# and also is not working in this context
I tested this with this command, but it works fine for me:
[Command("vehicle", "veh", "v", DisplayName = "v")]
private static void SpawnVehicleCommand(Player player, VehicleModelType model)
{
// Spawn vehicle
var vehicle = Vehicle.Create(model, player.Position, 0, 0, 0);
player.PutInVehicle(vehicle);
}
Could you provide a repro case?
Fixed in 0.10
With the following code,
/v tug
does not work (Usage message displayed), but/v Tug
works.This might be caused by 2 entries in the enum starting with same name: Tug and TugStairsTrailer.
https://github.com/ikkentim/SampSharp/blob/master/src/SampSharp.GameMode/SAMP/Commands/ParameterTypes/EnumType.cs#L59