/sellhouse and local chat only help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: /sellhouse and local chat only help (
/showthread.php?tid=552443)
/sellhouse and local chat only help -
RTRSorin - 24.12.2014
Hi, firstly i want to make a /sellhouse comand ( i am using gagi's house system but i do not like the player dialog so i want to make this command - the player dialog isn't even working when you chose something -) and i do not know how to make this one.
Secondly, i want to make a local chat only, so that when a player says something only the players near him can see, not the full server ( like this it would be chaos ) and show also under his name what he wrote on the chat. if you could leave me a tutorial or a pawn code for one of these two, i would be very grateful to you. Thank you.
Re: /sellhouse and local chat only help -
MD5 - 24.12.2014
Can't help you with the first one.
Something like this? A whisper command.
Код:
COMMAND:whisper(playerid, params[])
{
if(playerData[playerid][playerLoggedIn])
{
new string[250];
if (sscanf(params, "s[250]", string))
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"/(w)hisper <message>\"");
}
else
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new string2[250];
format(string2, sizeof(string2), "{FE9A2E}[WHISPER] {FFFFFF}%s(%i): %s", playerData[playerid][playerNamee], playerid, string);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 15.0, x, y, z))
{
SendClientMessage(i, COLOR_WHITE, string2);
}
}
}
}
return 1;
}
Edit it to fit your server.
Re: /sellhouse and local chat only help -
RTRSorin - 24.12.2014
Quote:
Originally Posted by MD5
Can't help you with the first one.
Something like this? A whisper command.
Код:
COMMAND:whisper(playerid, params[])
{
if(playerData[playerid][playerLoggedIn])
{
new string[250];
if (sscanf(params, "s[250]", string))
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"/(w)hisper <message>\"");
}
else
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new string2[250];
format(string2, sizeof(string2), "{FE9A2E}[WHISPER] {FFFFFF}%s(%i): %s", playerData[playerid][playerNamee], playerid, string);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 15.0, x, y, z))
{
SendClientMessage(i, COLOR_WHITE, string2);
}
}
}
}
return 1;
}
Edit it to fit your server.
|
I mean when a player is writting something lets say " hello " that " hello" not to be seen by everyone on the server , that "hello" to be seen only by the players around the one who said that from .. lets say 10 meters around him. i have playied on a server that was like this , and only the admins were able to see the global chat using a command /bigears ( what everyone says no matter if they were or not near the admin , messages and whispers and everything wrote on the chat - excluding the commands of course -). But thank you for the whisper one, i needed that too . +1
EDIT: after a log search i have found this thing, is
https://sampwiki.blast.hk/wiki/LimitGlobalChatRadius