10.03.2013, 14:33
hello guys.. i made "new LOL = 0;" .. how to make if 1 player connect the LOL is +1.. ane if player death LOL is -1.. and if LOL = 0, its show "GameTextForPlayer(playerid, "~b~NO LOL", 1000, 3);" ...
public OnPlayerConnect
{
LOL++; // adds 1 to the LOL
return 1;
}
public OnPlayerDeath
{
LOL--; //deducts 1 from LOL
if (LOL == 0)
{
//gametext function
}
return 1;
}
public OnPlayerConnect
{
LOL++; // adds 1 to the LOL
return 1;
}
public OnPlayerDeath
{
LOL--; //deducts 1 from LOL
return 1;
}
forward Win(playerid);
public Win(playerid)
{
if (LOL == 0)
{
SendClientMessageToAll(COLOR_RED, "LOL !");
}
return 1;
}
public OnPlayerConnect
{
LOL++; // adds 1 to the LOL
return 1;
}
public OnPlayerDeath
{
LOL--; //deducts 1 from LOL
SetTimer("Win", 1, false);
return 1;
}
forward Win();
public Win()
{
if (LOL == 0)
{
SendClientMessageToAll(COLOR_RED, "LOL !");
}
return 1;
}
public OnPlayerConnect(playerid)
{
LOL++;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
LOL--;
if(LOL == 0) { GameTextForAll("No LOL!", 3000, 3); }
return 1;
}