counting thing now working
#1

When only 1 player is left alive, it does nothing... (this is on OnPlayerDeath)
pawn Код:
if((countalive == 1) && pKilled[playerid] == 0)
    {
    SetTimer("gamewin", 4000, false);
    format(string,sizeof(string), "%s has won the deathmatch!", playername);
  GameTextForAll(string, 3000, 4);
    }
Reply
#2

Uhhh... I have a question :

Do you have something like this in your script?
pawn Код:
forward gamewin();
public gamewin()
{
 // do something here
 return 1;
}
If so, show it to us.
Reply
#3

pawn Код:
forward gamewin();
public gamewin()
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(pKilled[i] == 1)
{
GameTextForPlayer (i, "you lost", 3000, 0);
}
for(new i = 0; i < MAX_PLAYERS; i++)
if(pKilled[i] == 0)
{
GameTextForPlayer (i, "won", 3000, 0); }
}
Reply
#4

Is that all? if so, here you go :
pawn Код:
forward gamewin();
public gamewin()
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(pKilled[i] == 1)
{
GameTextForPlayer (i, "you lost", 3000, 0);
}
for(new i = 0; i < MAX_PLAYERS; i++)
if(pKilled[i] == 0)
{
GameTextForPlayer (i, "won", 3000, 0); }
}
return 1; // return 1;
}
Reply
#5

Try this:

pawn Код:
if(countalive == 1)
    {
        SetTimer("gamewin", 4000, false);
        format(string,sizeof(string), "%s has won the deathmatch!", playername);
        GameTextForAll(string, 3000, 4);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)