25.10.2012, 10:07
(
Последний раз редактировалось MarkzD; 25.10.2012 в 10:39.
)
Its a simple fs,so
OnPlayerCommandText
OnDialogResponse
You can add new colors:
OnPlayerCommandText
OnDialogResponse
Download:
Solidfiles
Pastebin
--------------------------------------------------------------------
P.S NOTE "//This mod by Dmitry_Jj for Winrp" - in last week i write a rp mod, so this standart "new.pwn" with this note
OnPlayerCommandText
PHP код:
if(!strcmp(cmdtext, "/clist", true))
{
ShowPlayerDialog(playerid, 392, DIALOG_STYLE_LIST, "{00FF00}Color{FF0000}List", "{FFFFFF}White\n{CCCCCC}Gray\n{00A90B}Green\n{00FF00}LightGreen\n{FF0000}Red\n{0015FF}Blue", "Okay", "Back");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 392: // dialog id
{
switch(listitem)
{
case 0:SetPlayerColor(playerid, 0xFFFFFFFF);
case 1:SetPlayerColor(playerid, 0xC0C0C0C8);
case 2:SetPlayerColor(playerid, 0x008000C8);
case 3:SetPlayerColor(playerid, 0x80FF00C8);
case 4:SetPlayerColor(playerid, 0xFF0000C8);
case 5:SetPlayerColor(playerid, 0x0000FFC8);
}
}
}
}
return 1;
}
OnPlayerCommandText
PHP код:
if(!strcmp(cmdtext, "/clist", true))
{
ShowPlayerDialog(playerid, 392, DIALOG_STYLE_LIST, "{00FF00}Color{FF0000}List", "{FFFFFF}White\n{CCCCCC}Gray\n{00A90B}Green\n{00FF00}LightGreen\n{FF0000}Red\n{0015FF}Blue\n{FF00FF}YourColor", "Okay", "Back");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 392: // dialog id
{
switch(listitem)
{
case 0:SetPlayerColor(playerid, 0xFFFFFFFF);
case 1:SetPlayerColor(playerid, 0xC0C0C0C8);
case 2:SetPlayerColor(playerid, 0x008000C8);
case 3:SetPlayerColor(playerid, 0x80FF00C8);
case 4:SetPlayerColor(playerid, 0xFF0000C8);
case 5:SetPlayerColor(playerid, 0x0000FFC8);
case 6:SetPlayerColor(playerid, 0xYOURCOLOR);
}
}
}
}
return 1;
}
Solidfiles
Pastebin
--------------------------------------------------------------------
P.S NOTE "//This mod by Dmitry_Jj for Winrp" - in last week i write a rp mod, so this standart "new.pwn" with this note