Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - TheMallard

#1
I don't speak Noobish and Kakanasslickish.
#2
Thank you very much! Topic closed.
#3
I was just talking about chat in general: is it possible to prevent chat messages from dissappearing and can VCMP developers add a feature to disable it.
#4
Yeah, I know about these features. But I want to use the Unicode support plugin, but there is no fonts for Russian, Chinese (ha-ha, Chinese font for Vice City) and other languages, so I think that only chat will be supported by this plugin.
#5
Hello everyone!
Is this possible to prevent chat messages from disappearing?
Can you create a setting for this?
This is really annoying, because there is no dialogs in VCMP, so the chat is the only method for information to stay at the screen for a long time, but since messages are disappearing, this is impossible.
#6
The name of the topic is self-explanatory.
Credits to SA-MP Team for roleplay style chat module.
Credits to Shadow for player loop method

playerIterator <- [];

function onPlayerJoin(player)
{
playerIterator.push(player.ID);
}

function onPlayerPart(player, reason)
{
playerIterator.remove(player.ID);
}

function onPlayerChat(player, text)
{
LocalMessage(player.Pos, 30.0, player.Name + " said: " + text, 255, 255, 255);
return 0;
}

function onPlayerCommand(player, cmd, text)
{
if(cmd == "me")
{
if(!text) return ClientMessage("SYNTAX: /me <action>", player, 255, 255, 255);
return LocalMessage(player.Pos, 30.0, "* " + player.Name + " " + text, 194, 162, 218);
}
if(cmd == "do")
{
if(!text) return ClientMessage("SYNTAX: /do <action>", player, 255, 255, 255);
return LocalMessage(player.Pos, 30.0, "* " + text + " (" + player.Name + ")", 70, 130, 180);
}
if(cmd == "b")
{
if(!text) return ClientMessage("SYNTAX: /b <text>", player, 255, 255, 255);
return LocalMessage(player.Pos, 30.0, "* (( " + player.Name + ": " + text + " ))", 255, 255, 255);
}
return ClientMessage("SERVER: Unknown command.", player, 255, 255, 255);
}

function GetPointDistanceToPoint(x1, y1, z1, x2, y2, z2)
{
return Vector(x1-x2, y1-y2, z1-z2).Length();
}

function LocalMessage(point, distance, message, R, G, B)
{
foreach(playerid, val in playerIterator)
{
if(GetPointDistanceToPoint(FindPlayer(playerid).Pos.x, FindPlayer(playerid).Pos.y, FindPlayer(playerid).Pos.z, point.x, point.y, point.z) < distance)
{
ClientMessage(message, FindPlayer(playerid), R, G, B);
}
}
}
#7
My function works properly.

Class Vector has a method, called "Length()"
#8
Hello!
I've created a small function, and I don't know, it works properly or not.
Is this the right code?
function getPointDistanceToPoint(x1, y1, z1, x2, y2, z2)
{
return Vector(x1-x2, y1-y2, z1-z2).Length();
}
#9
It will be great, if you will continue developing this plugin!