/me command
#2

are you sure you have ProxDetector already? if yes show it, no? here is it

PHP код:
stock ProxDetector(playeridFloat:max_rangecolorstring[], Float:max_ratio 1.6)
{
    new
        
Float:pos_x,
        
Float:pos_y,
        
Float:pos_z,
        
Float:range,
        
Float:range_ratio,
        
Float:range_with_ratio,
        
clr_rclr_gclr_b,
        
Float:color_rFloat:color_gFloat:color_b;
    if (!
GetPlayerPos(playeridpos_xpos_ypos_z)) {
        return 
0;
    }
    
color_r float(color >> 24 0xFF);
    
color_g float(color >> 16 0xFF);
    
color_b float(color >> 0xFF);
    
range_with_ratio max_range max_ratio;
#if defined foreach
    
foreach (new Player) {
#else
    
for (new GetPlayerPoolSize(); != -1i--) {
#endif
        
if (!IsPlayerStreamedIn(iplayerid)) {
            continue;
        }
        
range GetPlayerDistanceFromPoint(ipos_xpos_ypos_z);
        if (
range max_range) {
            continue;
        }
        
range_ratio = (range_with_ratio range) / range_with_ratio;
        
clr_r floatround(range_ratio color_r);
        
clr_g floatround(range_ratio color_g);
        
clr_b floatround(range_ratio color_b);
        
SendClientMessage(i, (color 0xFF) | (clr_b << 8) | (clr_g << 16) | (clr_r << 24), string);
    }
    
SendClientMessage(playeridcolorstring);
    return 
1;

EDIT: there is another error there, in your usage of GetPlayerName, its not like that if you want it that simple use a stock
PHP код:
stock GetName(playerid)
{
    new 
name[24]; GetPlayerName(playeridname24); return name;

PHP код:
CMD:me(playeridparams[])
{
    if(
isnull(params)) return SendClientMessage(playerid0xFF0000FF"SYNTAX: /me [action]");
    new 
string[128];
    
format(stringsizeof(string), "* %s %s "GetName(playerid), params);
    
ProxDetector(30.0playeridstring0xFF0000FF);
    return 
1;

Reply


Messages In This Thread
/me command - by Rassh - 21.08.2016, 00:56
Re: /me command - by Shinja - 21.08.2016, 01:21
Re: /me command - by Rassh - 21.08.2016, 14:16
Re: /me command - by Shinja - 21.08.2016, 14:18
Re: /me command - by WhiteGhost - 21.08.2016, 14:18
Re: /me command - by Rix70 - 21.08.2016, 15:37
Re: /me command - by Luis- - 21.08.2016, 15:41
Re: /me command - by NealPeteros - 21.08.2016, 15:45

Forum Jump:


Users browsing this thread: 2 Guest(s)