PDA

View Full Version : help commands


Langky
14/03/2017, 07:08 PM
CMD way for so RCON admin and set for player
This can be used for yourself


CMD:setfc(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
SetPlayerFlashColor(playerid, 1000, 1, 0x36A5C2AA, 0xFF0000AA);
}
return 1;
}

Toroi
14/03/2017, 07:11 PM
What?

Langky
14/03/2017, 07:13 PM
Command for RCON admin and set player color for playerid (sorry bad english)

RyderX
14/03/2017, 07:25 PM
Something like that:

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;
}


EDIT: Thanks BlackbirdXd

BlackbirdXd
14/03/2017, 07:31 PM
Something like that:

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;
}

if(!IsPlayerConnected(playerid))