Please help. Vehicle Colours
#1

Код:
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;
}
Why i have "SERVER: Unknown command." ? Please help.
Reply
#2

Instead of dialogs use this
Код:
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;
}
Reply
#3

No no no.. i wanna it's

Reply
#4

Show your on dialog response
Reply
#5

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;
}
Reply
#6

Can you write how i must put this code in pawno? In public OnDialogResponse and command
Reply
#7

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
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;
}
Thanks you. It working. Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)