18.08.2015, 18:53
Quote:
PHP код:
|
PHP код:
YCMD:mycolor(playerid,params[], help)
{
#pragma unused help
#pragma unused params
if(Account[playerid][VipLevel] < 1) return SendClientMessage(playerid,COLOR_RED,"Error: {FFFFFF}You are not a Donator Member!");
new Redrebels;
new Green;
new Blue;
if(sscanf(params, "ddd", Redrebels,Green,Blue))
{
SendClientMessage( playerid,COLOR_RED, "Usage: {FFFFFF}/mycolor [0-255] [0-255] [0-255]");
return 1;
}
if((Redrebels >= 0 && Green >= 0 && Blue >= 0) && (Redrebels <= 255 && Green <= 255 && Blue <= 255))
{
new mixedColor = 0;
mixedColor = (Redrebels << 24) + (Green << 16) + (Blue << 8) + 255;
SetPlayerColor(playerid, mixedColor);
SendClientMessage(playerid, -1, "Done!");
return 1;
}
else
{
SendClientMessage(playerid, -1, "Error: one or more channels are out of bounds (0<>255)");
return 1;
}
}