Doubled message
#1

Hello everyone,
Whenever someone wins it shows Double-messaged where as in the script I've written only one


SS:


code:
pawn Код:
public MinigameWinner( player,playerid )
{
    new stringaaaaaaaaaa[128];
    GetPlayerName(playerid, PlayerrrrName, sizeof(PlayerrrrName));
    format( stringaaaaaaaaaa, sizeof( stringaaaaaaaaaa ), "* %s has won Fallout minigame!", PlayerrrName( player ) );
    Iter_Remove(_Minigamer, playerid );
    SendClientMessageToAll( LIME, stringaaaaaaaaaa );
    InFallout[playerid] = 1;
    GivePlayerMoney( player, PRIZE_MONEY );
    Minigamer_{ player } = false;
    Iter_Remove(_Minigamer, player );
    SetTimerEx( "RespawnPlayer", 1400, 0, "i", player );
    SetTimer( "EndMinigame", 1700, 0);
}
I can't seem to found the issue of it

-thanks!
Reply
#2

Try this one
pawn Код:
public MinigameWinner( player,playerid )
{
    new stringaaaaaaaaaa[128];
    GetPlayerName(player, PlayerrrrName, sizeof(PlayerrrrName));
    format( stringaaaaaaaaaa, sizeof( stringaaaaaaaaaa ), "* %s has won Fallout minigame!", PlayerrrrName );
    Iter_Remove(_Minigamer, playerid );
    SendClientMessageToAll( LIME, stringaaaaaaaaaa );
    InFallout[playerid] = 1;
    GivePlayerMoney( player, PRIZE_MONEY );
    Minigamer_{ player } = false;
    Iter_Remove(_Minigamer, player );
    SetTimerEx( "RespawnPlayer", 1400, 0, "i", player );
    SetTimer( "EndMinigame", 1700, 0);
}
Reply
#3

Still the same
Reply
#4

Ctrl+f and look for "has won Fallout minigame"
If you found another one delete it.
Reply
#5

I've already tried that but still no luck!
Reply
#6

I guess the message appears again but in a different place, not in that public.

You can change the message to be sure though:
pawn Код:
"* %s has won Fallout minigame!"
to:
pawn Код:
"[DEBUG]: * %s has won Fallout minigame!"
Will the second message show the DEBUG prefix? If it doesn't do, then it might show the message in another public OR MinigameWinner is called twice (most likely).
Reply
#7

Still the same
Reply
#8

Then MinigameWinner is called twice.

Where do you call it?
Reply
#9

show EndMinigame code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)