16.10.2011, 16:28
No.
pawn Код:
CMD:vehcolor(playerid,params[])
{
new col1,col2; //The 2 colors.
if(!IsPlayerInAnyVehicle(playerid)) return SendError(playerid, "You need to be in a vehicle to use this command!"); //If the player isn't in a vehicle, it send the Error.
new vID = GetPlayerVehicleID(playerid); //The VehicleID
if(gPlayerData[playerid][E_VIP_LEVEL] < 1) return 1;
else if(sscanf(params, "ii", col1,col2)) SendUsage(playerid, "/vehcolor [COLOR 1] [COLOR 2]"); //If the parameters he entered aren't Intregers (numbers), it sends the error.
else if(col1 < 0 && col1 > 126 && col2 < 0 && col2 > 126) return SendError(playerid,"Invalid color!"); //If the color he entered isn't a valid color, it sends the error.
else
{
ChangeVehicleColor(vID,col1,col2);
}
return 1;
}