[Help] Send Message To SWAT
#10

Problem Found!

pawn Код:
public MessaggioSwat()
{
new name[MAX_PLAYER_NAME];

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
        GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name, "[sw]", true))
        {
                    GameTextForPlayer(playerid,"%s Need Help!", 3000, 3, callingplayer);

            }
        }
    }
    return 1;
}
Look at this script:

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
The variable for player is i and what i found is:

pawn Код:
GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name, "[sw]", true))
        {
                    GameTextForPlayer(playerid,"%s Need Help!", 3000, 3, callingplayer);

            }
        }
You should change the playerid into i. So it will be like this:

pawn Код:
GetPlayerName(i, name, sizeof(name));
        if(strcmp(name, "[sw]", true))
        {
                    GameTextForPlayer(i,"%s Need Help!", 3000, 3, callingplayer);

            }
        }
Reply


Messages In This Thread
[Help] Send Message To SWAT - by [SsC11]MAVERIK - 27.03.2010, 08:34
Re: [Help] Send Message To SWAT - by Sebago[X] - 27.03.2010, 08:43
Re: [Help] Send Message To SWAT - by [SsC11]MAVERIK - 27.03.2010, 08:51
Re: [Help] Send Message To SWAT - by jamesbond007 - 27.03.2010, 09:22
Re: [Help] Send Message To SWAT - by MadeMan - 27.03.2010, 09:29
Re: [Help] Send Message To SWAT - by [SsC11]MAVERIK - 27.03.2010, 09:32
Re: [Help] Send Message To SWAT - by [SsC11]MAVERIK - 28.03.2010, 09:41
Re: [Help] Send Message To SWAT - by MadeMan - 28.03.2010, 10:11
Re: [Help] Send Message To SWAT - by [SsC11]MAVERIK - 28.03.2010, 11:13
Re: [Help] Send Message To SWAT - by VirSpectorX - 28.03.2010, 11:48

Forum Jump:


Users browsing this thread: 2 Guest(s)