/bigears?
#2

pawn Код:
new bool:BigEars[MAX_PLAYERS]; //At the top of your script

//The command
if(strcmp("/bigears",cmdtext,true,8) == 0)
{
    if(BigEars[playerid] == false) return BigEars[playerid] = true;
    if(BigEars[playerid] == true) return BigEars[playerid] = false;
}

//Under OnPlayerText
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
format(string,MAX_STRING,"%s: %s",n,text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(BigEars[i] == true)
        {
            if(IsPlayerInRangeOfPoint(i,30,pX,pY,pZ))
            {
                SendClientMessage(i,COLOR_GRAD1,string);
                return 0;
            }
        }
        else
        {
            if(IsPlayerInRangeOfPoint(i,5,pX,pY,pZ))
            {
                SendClientMessage(i,COLOR_GRAD1,string);
                return 0;
            }
        }
    }
}
return 0;
Reply


Messages In This Thread
/bigears? - by Gramercy Riffs - 17.10.2011, 15:07
Re: /bigears? - by AeroBlast - 17.10.2011, 15:16
Re: /bigears? - by Gramercy Riffs - 17.10.2011, 15:26

Forum Jump:


Users browsing this thread: 1 Guest(s)