help commands - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help commands (
/showthread.php?tid=630465)
help commands -
Langky - 14.03.2017
CMD way for so RCON admin and set for player
This can be used for yourself
PHP код:
CMD:setfc(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
SetPlayerFlashColor(playerid, 1000, 1, 0x36A5C2AA, 0xFF0000AA);
}
return 1;
}
Re: help commands -
Toroi - 14.03.2017
What?
Re: help commands -
Langky - 14.03.2017
Command for RCON admin and set player color for playerid (sorry bad english)
Re: help commands -
RyderX - 14.03.2017
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;
}
EDIT: Thanks BlackbirdXd
Re: help commands -
BlackbirdXd - 14.03.2017
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))