My /local dosn't work
#3

Quote:
Originally Posted by Don Correlli
It's better if you use 'playerid' instead of 'i' here:
pawn Код:
Name(playerid)
{
new n[24];
GetPlayerName(playerid, n, 24);
return n;
}
This is correct:
pawn Код:
if(!strcmp(cmdtext, "/b", true))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetDistanceBetweenPlayers(playerid, i) <= 20)
{
if(cmdtext[2] == 32 || cmdtext[3] != EOS)
{
new str[128];
format(str, 128, "%s: %s", Name(playerid), cmdtext[3]);
SendClientMessage(i, COLOR_WHITE, str);
}
}
}
return true;
}
And you also need 'GetDistanceBetweenPlayers' function. Search in scripting-boards for it.
Cant find the GetDistanceBetweenPlayers function... do you?
Reply


Messages In This Thread
My /local dosn't work - by FreddeN - 24.05.2009, 13:51
Re: My /local dosn't work - by Correlli - 24.05.2009, 14:01
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:10
Re: My /local dosn't work - by Correlli - 24.05.2009, 14:12
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:19
Re: My /local dosn't work - by Klutty - 24.05.2009, 14:28
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:34
Re: My /local dosn't work - by Klutty - 24.05.2009, 14:36
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:40
Re: My /local dosn't work - by woot - 25.05.2009, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)