Counting Score for two players
#1

Hello everybody
tell me please, how to make:
Make Counting Score for two players, how As for example in football

"Player1 Win with score: %d:%d vs player2"

Reply
#2

format the string
Reply
#3

i know that after a format, but can tell me in details how to make?
Reply
#4

Peter Corneile [hugu-hosting.co.uk]
Reply
#5

upd
Reply
#6

Stop bumping.

pawn Код:
if(GetPlayerScore(_PLAYER_ONE_ID_) > GetPlayerScore(_PLAYER_TWO_ID_))
{
  // player with ID _ONE_ID_ has a bigger score than player with ID _TWO_ID_.
}
else if(GetPlayerScore(_PLAYER_ONE_ID_) < GetPlayerScore(_PLAYER_TWO_ID_))
{
  // player with ID _TWO_ID_ has a bigger score than player with ID _ONE_ID_.
}
else
{
  // the score is the same.
}
Reply
#7

Quote:
Originally Posted by Don Correlli
Stop bumping.

pawn Код:
if(GetPlayerScore(_PLAYER_ONE_ID_) > GetPlayerScore(_PLAYER_TWO_ID_))
{
  // player with ID _ONE_ID_ has a bigger score than player with ID _TWO_ID_.
}
else if(GetPlayerScore(_PLAYER_ONE_ID_) < GetPlayerScore(_PLAYER_TWO_ID_))
{
  // player with ID _TWO_ID_ has a bigger score than player with ID _ONE_ID_.
}
else
{
  // the score is the same.
}
no.. i not needed your code.. i needed to example
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(In[killerid] == 1 && In[playerid] == 1)
	{
 		if(2 != Score[killerid])
        {
  	Score[killerid]++;
  	format(string, 256, "%s v %d :%d  %s !!!", pwName, Score, Score, vs);
   	SendClientMessageToAll(0x33AA33AA, string);
        }
   	else if(Score[killerid] == 2)
        	{
    	Score[killerid]++;
   	format(string, 256, "%s Win %s , Score: %d :%d !", winer, proigr, Score, Score);
   	SendClientMessageToAll(0x33AA33AA, string);
 	 }
Reply
#8

Quote:
Originally Posted by vrootis
no.. i not needed your code.. i needed to example
My code IS an example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)