local OOC
#2

pawn Код:
if(!strcmp(cmdtext, "/b", true))
{
    for(new i=0; i<MAX_PLAYERS; i++) //Gettting all players in the variable i
    {
        if(GetDistanceBetweenPlayers(playerid, i) <= 20) //Correct me if there are more arguments in Getdistance...
        {
            if(cmdtext[2] == 32 || cmdtext[3] != EOS) //if there is a space and end of string isn't right after the space
            {
                new str[128];
                format(str, 128, "%s: %s", Name(playerid), cmdtext[3]);
                SendClientMessage(i, COLOR_WHITE, str); //Send message to all players nearby
            }
        }
    }
    return true;
}
pawn Код:
//place this on bottom of script
Name(i)
{
    new n[24];
    GetPlayerName(i, n, 24);
    return n;
}
That should work
Reply


Messages In This Thread
local OOC - by masterhix - 30.03.2009, 11:25
Re: local OOC - by LarzI - 30.03.2009, 12:30
Re: local OOC - by masterhix - 30.03.2009, 15:04
Re: local OOC - by Nero_3D - 30.03.2009, 15:17
Re: local OOC - by LarzI - 30.03.2009, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)