28.05.2013, 02:01
I'm not sure what tolower is, but looked it up and saw it was something to deal with OnPlayerText, this is what's in it.
This is GetName(playerid)
And SendLocalMessage
pawn Код:
new message[128];
format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
SendLocalMessage(playerid, WHITE, message);
return 0;
pawn Код:
stock GetName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
pawn Код:
stock SendLocalMessage(playerid, color, string[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
foreach(Player, i)
{
if(IsPlayerConnected(i)) //&& GetPVarInt(i, "LoggedIn") == 1)
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
{
if(IsPlayerInRangeOfPoint(i, 20, x, y, z))
{
SendClientMessage(i, color, string);
}
}
}
}
return 1;
}