Tenta esse abaixo.
pawn Код:
CMD:cv(playerid, params[])
{
if(/* variavel de adm */)
{
new string[256], modelo, carro, cor1, cor2,
Float:X, Float:Y, Float:Z, Float:Angle;
if(sscanf(params, "ddd", modelo, cor1, cor2)) return SendClientMessage(playerid, -1, "Digite: /cv [modelo] [cor1] [cor2]");
if(IsPlayerConnected(playerid))
{
if(modelo >= 400 && modelo <= 611)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Saia deste veнculo para criar outro.");
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
carro = AddStaticVehicleEx(modelo, X, Y, Z, Angle, cor1, cor2, 30);
LinkVehicleToInterior(carro, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carro, GetPlayerVirtualWorld(playerid));
format(string, sizeof(string), "Vocк criou o veнculo de id: %d", modelo);
SendClientMessage(playerid, -1, string);
}
else SendClientMessage(playerid, -1, "ID invбlido, tente novamente! (ID's: 400-611");
}
}
return 1;
}
ddd