19.10.2011, 12:10
I''ve made this function so that if I write "My name is Knappen", it checks my player name from a MySQL database, and then it's supposed to add my name into all the player's mysql tables, but only the players nearby me. My only problem is this:
I started scripting not that long ago, and I've been studying up on loops lately, to understand how to use it. But as you see, I can't get it to work.
I would be very grateful if anyone could help me. If you need more information about the script/function, don't hesitate to ask.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(strfind(result, NameTagInfo[playerid][nFirstName], true) != -1 || strfind(result, NameTagInfo[playerid][nLastName], true) != -1)
{
if(IsPlayerNearPlayer(i, playerid, 5))
{
if(NameTagInfo[i][nFriend1] == 0 && i != playerid)
{
SendClientMessage(i, COLOR_YELLOW, "It Worked");
return 1;
}
}
}
I would be very grateful if anyone could help me. If you need more information about the script/function, don't hesitate to ask.