OnPlayerText
#9

На PI Thule написал ещё так:
pawn Код:
SendClientMessage(playerid, floatround(4294967295 - 89829376*(dist/(range/6))), text);
Кстати, сделай замер скорости с:
pawn Код:
stock ProxDetector_OK(Float:radius = 30.0, playerid, text[], col1 = 0xFFFFFFFF, col2 = 0xCCCCCCFF, col3 = 0x999999FF, col4 = 0x666666FF, col5 = 0x333333FF)
{
//  SetPlayerChatBubble(playerid, text, col1, radius, 5 * 1000);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i = GetPlayerPoolSize(), Float:dist, virtualworld = GetPlayerVirtualWorld(playerid), interior = GetPlayerInterior(playerid); i != -1; i--)
    {
        if(!IsPlayerConnected(i) || IsPlayerNPC(i) || virtualworld != GetPlayerVirtualWorld(i) || interior != GetPlayerInterior(i)) continue;
        dist = GetPlayerDistanceFromPoint(i, x, y, z);
        if(dist < radius / 16) SendClientMessage(i, col1, text);
        else if(dist < radius / 8) SendClientMessage(i, col2, text);
        else if(dist < radius / 4) SendClientMessage(i, col3, text);
        else if(dist < radius / 2) SendClientMessage(i, col4, text);
        else if(dist < radius) SendClientMessage(i, col5, text);
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerText - by FaGo - 03.08.2016, 13:57
Re: OnPlayerText - by Diman777 - 03.08.2016, 15:12
Re: OnPlayerText - by Romz - 03.08.2016, 15:25
Re: OnPlayerText - by FaGo - 03.08.2016, 17:44
Re: OnPlayerText - by Mutha_X - 03.08.2016, 18:40
Re: OnPlayerText - by FaGo - 03.08.2016, 22:23
Re: OnPlayerText - by OKStyle - 17.08.2016, 07:15
Re: OnPlayerText - by ZiGGi - 17.08.2016, 13:33
Re: OnPlayerText - by OKStyle - 17.08.2016, 17:14
Re: OnPlayerText - by Mutha_X - 17.08.2016, 17:36
Re: OnPlayerText - by OKStyle - 17.08.2016, 17:45
Re: OnPlayerText - by Mutha_X - 17.08.2016, 17:56
Re: OnPlayerText - by ZiGGi - 17.08.2016, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)