CMD:carcolour(playerid,params[])
{
if(AccInfo[playerid][Level] >= 3)
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
new tmp4[256]; tmp4 = strtok(params,Index);
new tmp5[256]; tmp5 = strtok(params,Index);
if(isnull(tmp) || isnull(tmp2) || isnull(tmp3) ||isnull(tmp4) ||isnull(tmp5) || !IsNumeric(tmp2)) return
Inter_SendClientMessage(playerid, LIGHTBLUE2, "Usage: /carcolour [PlayerID] [Colour1] [Colour2] [Colour3] [Colour4]") &&
Inter_SendClientMessage(playerid, orange, "Function: Will change vehicle colour of specified player");
new player1 = strval(tmp), colour1, colour2, colour3, colour4, string[128];
if(isnull(tmp2)) colour1 = random(126);
else colour1 = strval(tmp2);
if(isnull(tmp3)) colour2 = random(126);
else colour2 = strval(tmp3);
if(isnull(tmp4)) colour3 = random(126);
else colour3 = strval(tmp4);
if(isnull(tmp5)) colour4 = random(126);
else colour4 = strval(tmp5);
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return Inter_SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
if(IsPlayerInAnyVehicle(player1))
{
SendCommandToAdmins(playerid,"CarColour");
format(string, sizeof(string), "|- You have Changed the colour of \"%s's\" %s to '%d,%d,%d,%d' -|", PlayerName2(player1), VehicleNames[GetVehicleModel(GetPlayerVehicleID(player1))-400], colour1, colour2, colour3, colour4);
Inter_SendClientMessage(playerid,BlueMsg,string);
if(player1 != playerid)
{
format(string,sizeof(string),"|- Administrator \"%s\" has changed the Colour of your %s to '%d,%d,%d,%d'' -|", pName(playerid), VehicleNames[GetVehicleModel(GetPlayerVehicleID(player1))-400], colour1, colour2, colour3, colour4);
Inter_SendClientMessage(player1,blue,string);
}
return ChangeVehicleColor(GetPlayerVehicleID(player1), colour1, colour2, colour3, colour4);
}
else return Inter_SendClientMessage(playerid,red,"ERROR: Player is not in a vehicle");
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}
|
Yes, but only on specific cars. Let's say Savanna, the interior colour gets controled. There are also more cars but I just can't be arse to post them all in here. Anyways, the first 2 colours are the main ones so you want to use them.
|
savanna, 97,96, 88,64, 90,96, 93,64, 97,96, 99,81, 102,114, 114,1
cement, 60,24,23,0, 61,27,123,0, 65,31,31,0, 61,61,30,0, 81,35,23,0, 62,61,62,0, 83,66,64,0, 83,64,64,0