SA-MP Forums Archive
How Can I - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How Can I (/showthread.php?tid=483327)



How Can I - R4mpage - 25.12.2013

How Can I disable when i enter soem text and press enter, that everyone in the server can see it
I want my chat to be like rp


Re: How Can I - SilentSoul - 25.12.2013

pawn Код:
public OnPlayerText(playerid, text[])
{
    return 0;
}
By returning false OnPlayerText , sorry but what is the Usage of that you will disable the global chat by this way.


Re: How Can I - R4mpage - 25.12.2013

Silent can you help me over skype? since when ppl post like 40% of the time i dont understand, maybe you can do it for me tho skype share screen


Re: How Can I - SilentSoul - 25.12.2013

Skype screen sharing won't load the game-play fps , could you take an image for what you are looking for ? (enter the server you've seen that feature and just link me with an image). or you can just explain what you want perfectly.


Re: How Can I - R4mpage - 25.12.2013

When You are roleplaying, when just typing smth, it only pops up for the people around you, not the whole server, I want when i type something that ONLY the people AROUND me can see it, not whole san andreas it self, ex.

I am at Four Dragons Casino, my friend is next to me, I type smth, and only the people around me like 10 meters radius away from me can see the text, not people all over the map


Re: How Can I - SilentSoul - 25.12.2013

pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[24],string[126];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"%s[%d]: %s",name,playerid,text);
    SendNearMessage(playerid, -1, string);
    return 0;
}
stock SendNearMessage(playerid, color, string[])
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    for(new i; i <= MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i,100.0, x,y,z)) SendClientMessage(i, color, string);
    }
    return 1;
}



Re: How Can I - xVIP3Rx - 25.12.2013

Another one..
pawn Код:
public OnPlayerText(playerid, text[])
{
    new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
    new String[128]; format(String, sizeof(String), "%s[%d]: %s", PlayerName, playerid, text);
    new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
   
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 10.0, Pos[0], Pos[1], Pos[2]))
        {
            SendClientMessage(i, -1, String);
        }
    }
    return 0;
}