public OnPlayerText(playerid, text[])
{
new string[128],pName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 6)
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),""COL_RED"[Server Owner]"COL_WHITE" %s: %s",pName,text);
SendClientMessageToAll(COLOR_WHITE,string);
return 0;
}
public OnPlayerText(playerid, text[])
{
new string[128],pName[24];
if(PlayerInfo[playerid][pAdmin] < 6) return 1;
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),""COL_RED"[Server Owner]"COL_WHITE" %s: %s",pName,text[0]);
SendClientMessageToAll(COLOR_WHITE,string);
return 0;
}
if (playerid info level >= 6)
{
// get player name, format, sendclientmessage
return 0;
}
public OnPlayerText(playerid, text[])
{
new string[256], pname[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 6)
{
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[Server Owner] %s: %s", pname,text);
SendClientMessageToAll(COLOR_WHITE, string);
}
return 0;
}
|
Код:
public OnPlayerText(playerid, text[])
{
new string[256], pname[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 6)
{
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[Server Owner] %s: %s", pname,text);
SendClientMessageToAll(COLOR_WHITE, string);
}
return 0;
}
|
|
Originally Posted by SA-MP Wiki
Returns Returning 0 in this callback will stop the text from being sent
|