Quantcast
Viewing all articles
Browse latest Browse all 595

[FilterScript] Talking to people in RP way [RolePlay Servers]

Talking in RP way




Hello guys I am Star, and I am new scripter. I was bored so I decieded to make an easy script about how to speak with players in RP way.Like when you write something at chat it won't be like DM chat anyone can see it, only people who are near will see what you wrote, it's very easy I hope it will be useful!

Includes
1. a_samp
2. Foreach by Y_Less. // link : https://github.com/Misiur/YSI-Includes/tree/YSI.tl


Code:

#include    <a_samp>
#include.  <foreach>

public OnPlayerText( playerid, text[ ] )
{
    new
        szStr[ 128 ], pName[ 24 ];

    GetPlayerName( playerid, pName, sizeof pName );

    format( szStr, sizeof szStr, "%s said : {FFFFFF}%s.", pName, text );

    new Float: X, Float: Y, Float: Z; GetPlayerPos( playerid, X, Y, Z );

    foreach (Player, i)
    {
        if ( IsPlayerInRangeOfPoint( i, 10.0/*range*/, X, Y, Z ) )// CHANGE THE 10.0 IF YOIU WANT TO CHANGE THE RANGE.
        {
            SendClientMessage( i, 0xAAAAAAAA, szStr );
        }
    }

  return 0; // Won't send the original message.
}


Viewing all articles
Browse latest Browse all 595

Trending Articles