01.06.2012, 15:28
Try this:
pawn Код:
COMMAND:veh(playerid,params[])
{
new Float:X,Float:Y,Float:Z;
new pName[MAX_PLAYER_NAME];
if(sscanf(params,"ddd", vehid,Colorone,Colortwo)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE" Usage: "GREEN"/veh "WHITE"[vehid] [COLOR1] [COLOR2]");
if(vehid < 400 ||vehid > 611) return SendClientMessage(playerid, COLOR_WHITE,"Veh id can't be below 400 or above 611");
GetPlayerName(playerid, pName ,sizeof(pName));
GetPlayerPos(playerid,X,Y,Z);
new str[128];
format(str , sizeof(str),"%s has create vehicle id %d ,Color1[%d],Color2[%d]",pName,vehid,Colorone,Colortwo);
CreateVehicle(vehid,X,Y,Z,0,Colorone,Colortwo,false);
SendClientMessageToAll(COLOR_LIGHTBLUE, str);
return 1;
}