whisper cmd problem
#1

hi all , hope you all okay , i have some problems maybe its loops problem i'm not sure about it, the problem is when i use the cmd i just can see it not the other players that close to me i don't know why , i hope you can fix it and thank you

PHP код:
if(strcmp(cmdtext"/w"true2)==0||strcmp(cmdtext"/W"true2)==0) {
    if(!
cmdtext[2])return SendClientMessage(playeridCOLOR_LIGHTERBLUE"USAGE: /w [text] - To Whisper");
    
SetPlayerChatBubble(playeridcmdtext[3], 0xa6a6a6AA100.010000);
    new 
pname1[24], string[250], Float:xFloat:yFloat:z;
    
GetPlayerName(playeridpname124);
    
GetPlayerPos(playerid,x,y,z);
    
format(string250"%s whisper: %s"pname1cmdtext[3]);
    for(new 
i=0;i<=MAX_PLAYERS;i++)
    {
     if(
IsPlayerInRangeOfPoint(i,15.0,x,y,z)) return SendClientMessage(iCOLOR_YELLOWstring);
    }
    return 
1;
    } 
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/w", true, 2)==0||strcmp(cmdtext, "/W", true, 2)==0)
{
    if(!cmdtext[2])return SendClientMessage(playerid, COLOR_LIGHTERBLUE, "USAGE: /w [text] - To Whisper");
    SetPlayerChatBubble(playerid, cmdtext[3], 0xa6a6a6AA, 100.0, 10000);
    new pname1[24], string[250], Float:x, Float:y, Float:z;
    GetPlayerName(playerid, pname1, 24);
    GetPlayerPos(playerid,x,y,z);
    format(string, 250, "%s whisper: %s", pname1, cmdtext[3]);

    for(new i;i<=MAX_PLAYERS;i++)
        if(IsPlayerInRangeOfPoint(i,15.0,x,y,z))
            SendClientMessage(i, COLOR_YELLOW, string);

    return 1;
}
Reply
#3

Thanks So Much Sir
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)