27.09.2010, 23:47
Worked fine for me with rcon admin..
Added wrong color id too
Added wrong color id too
pawn Код:
command(spawncar, playerid, params[])
{
new carid, Float:CarToX, Float:CarToY, Float:CarToZ, car, color1, color2;
if(PlayerStatistics[playerid][pAdminLevel] < 3) return SendClientMessage(playerid, COLOR_WHITE, "INFO: You don't have access");
if(sscanf( params, "iii", carid, color1, color2)) return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /spawncar [modelid] [color1] [color2]");
if(carid < 400 || carid > 611) return SendClientMessage(playerid, COLOR_RED, "Wrong model ID (min: 400 max: 600)");
if(color1 < 0 || color1 > 252) return SendClientMessage(playerid, COLOR_RED, "Wrong color1 ID (min: 0 max: 252)");
if(color2 < 0 || color2 > 252) return SendClientMessage(playerid, COLOR_RED, "Wrong color2 ID (min: 0 max: 252)");
GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
car = CreateVehicle(carid, CarToX, CarToY+4, CarToZ, 90, color1, color2, -1);
LinkVehicleToInterior(car, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(car, 0);
PutPlayerInVehicle(playerid, car, 0);
return 1;
}