02.02.2012, 20:15
Is there any way to add car colors 3 and 4 to the /carcolour # # # command? They are just random but I would like to be able to change them.
This is what I got so far.
Here are some 4 color cars.
camper, 1,31,1,0, 1,31,1,0, 1,20,3,0, 1,5,0,0, 0,6,3,0, 3,6,3,0, 16,0,8,0, 17,0,120,0
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
squalo, 0,0,0,1, 1,5,1,1, 3,3,0,1, 1,22,1,1, 1,35,1,1, 1,44,1,1, 1,53,1,1, 1,57,1,1
This is what I got so far.
Here are some 4 color cars.
camper, 1,31,1,0, 1,31,1,0, 1,20,3,0, 1,5,0,0, 0,6,3,0, 3,6,3,0, 16,0,8,0, 17,0,120,0
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
squalo, 0,0,0,1, 1,5,1,1, 3,3,0,1, 1,22,1,1, 1,35,1,1, 1,44,1,1, 1,53,1,1, 1,57,1,1
Код:
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); }