Quote:
Originally Posted by RyderX
Something like that:
PHP код:
CMD:setcolor(playerid, params[])
{
new id;
new color;
new string[128];
new tname[MAX_PLAYER_NAME];
GetPlayerName(id,tname,sizeof(tname));
if(sscanf(params,"is[128]",id,color)) return SendClientMessage(playerid, -1, "/setcolor [id] [color]");
if(IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player isn't connected");
if(color < 0 || color > 99999999) return SendClientMessage(playerid, -1,"invalid color!");
SetPlayerColor(id, color);
format(string, sizeof(string),"You have changed %s's Color to %d",tname,color);
SendClientMessage(playerid, -1, string);
return 1;
}
|
Код HTML:
if(!IsPlayerConnected(playerid))