28.10.2014, 07:17
Tittle says it all, can someone show me an example on how to make it? Is there something that detects the color? I am new to scripting so I don't know too much.
GetPlayerColor(playerid) SetPlayerColor(playerid,color) |
public OnPlayerSpawn(playerid)
{
SetPlayerColor(playerid,0xFF0000FF);this will set player color to RED
return 1:
}
pawn Код:
|
heres some link that will help u
https://sampwiki.blast.hk/wiki/GetPlayerColor https://sampwiki.blast.hk/wiki/SetPlayerColor ex: pawn Код:
|
public OnPlayerText(playerid, text[])
{
new pname[30],string[128];// declaring a variable which we can store our player name and formatted string
GetPlayerName(playerid,pname,sizeof(pname));// getting the player name
format(string,sizeof(string),"%s {FFFFFF}says :%s"pname,text);// formatting
SendClientMessageToAll(GetPlayerColor(playerid),text);
return 0;
}
CMD:say(playerid,params[])
{
new pname[30],string[128];
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"%s {FFFFFF}says %s",pname,params);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 1;
}
something like this:
pawn Код:
|