Problem with string range
#5

There is a slight problem

With that code +
PHP код:
public OnPlayerText(playeridtext[])
{
    new 
message[128];
    new 
Float:Pos[3];
    if(
AccInfo[playerid][Muted] == 0) {
        
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        
format(messagesizeof(message), "%s says: %s"GetRoleplayName(playerid), text);
        
IC_ChatLog(message);
        
SetPlayerChatBubble(playeridtext0xFFFFFF10.03000);
        foreach(new 
Player) {
            if(
IsPlayerInRangeOfPoint(i,10,Pos[0],Pos[1],Pos[2])) {
                
format(messagesizeof(message), "{FFFFFF} %s"text);
                
SendRPMessage(playerid,10,message);
            }
             else if(
IsPlayerInRangeOfPoint(i,20,Pos[0],Pos[1],Pos[2])) {
                
format(messagesizeof(message), "{BABABA} %s"text);
                
SendRPMessage(playerid,20,message);
            }
        }
    }
    else {
        
Msg(playerid,COLOR_RED,"You are muted. You cannot speak");
        return 
0;
    }
    return 
0;

It shows amount of messages based on players around you. Ie 2 players, it will show 2 messages
Reply


Messages In This Thread
Problem with string range - by TwinkiDaBoss - 04.01.2016, 22:11
Re: Problem with string range - by Lucky13 - 04.01.2016, 22:53
Re: Problem with string range - by TwinkiDaBoss - 04.01.2016, 23:13
Re: Problem with string range - by Lucky13 - 04.01.2016, 23:15
Re: Problem with string range - by TwinkiDaBoss - 05.01.2016, 14:45
Re: Problem with string range - by Lucky13 - 05.01.2016, 14:52
Re: Problem with string range - by Lucky13 - 05.01.2016, 14:54
Re: Problem with string range - by TwinkiDaBoss - 05.01.2016, 15:09
Re: Problem with string range - by Lucky13 - 05.01.2016, 15:18
Re: Problem with string range - by TwinkiDaBoss - 05.01.2016, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)