if (strcmp("/clist", cmd, true) == 0)
{
new
info[3343],
count = -1;
for (new i; i != sizeof (gVehicleColors); ++i)
{
format(info, sizeof (info), "%s{%06x}#%03i ", info, gVehicleColors[i] >>> 8, i);
if (++count == 15)
{
strcat(info, "\n", sizeof (info));
count = -1;
}
}
ShowPlayerDialog(playerid, 9666, DIALOG_STYLE_MSGBOX, "Vehicle Colours", info, "Close", "");
return 1;
}
CMD:carcolour(playerid, params[])
{
new c1,c2;
new vid = GetPlayerVehicleID(playerid);
if(pInfo[playerid][Adminlevel] < 3) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle to use this command.");
if (vid == 0) return SendClientMessage(playerid, COLOR_RED, "/carcolour [0-255] [0-255]");
if(!sscanf(params, "ii", c1,c2)){
ChangeVehicleColor(vid, c1,c2);
}
else
{
SendClientMessage(playerid, COLOR_RED, "/carcolour [0-255] [0-255]");
}
return 1;
}
CMD:clist(playerid, params[])
{
new
info[3343],
count = -1;
for (new i; i != sizeof (gVehicleColors); ++i)
{
format(info, sizeof (info), "%s{%06x}#%03i ", info, gVehicleColors[i] >>> 8, i);
if (++count == 15)
{
strcat(info, "\n", sizeof (info));
count = -1;
}
}
ShowPlayerDialog(playerid, 9666, DIALOG_STYLE_MSGBOX, "Vehicle Colours", info, "Close", "");
return 1;
}
|
Or Try This ...
Код:
CMD:clist(playerid, params[])
{
new
info[3343],
count = -1;
for (new i; i != sizeof (gVehicleColors); ++i)
{
format(info, sizeof (info), "%s{%06x}#%03i ", info, gVehicleColors[i] >>> 8, i);
if (++count == 15)
{
strcat(info, "\n", sizeof (info));
count = -1;
}
}
ShowPlayerDialog(playerid, 9666, DIALOG_STYLE_MSGBOX, "Vehicle Colours", info, "Close", "");
return 1;
}
|