Counting Score for two players - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Counting Score for two players (
/showthread.php?tid=98936)
Counting Score for two players -
user226 - 24.09.2009
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"
Re: Counting Score for two players -
Peter_Corneile - 24.09.2009
format the string
Re: Counting Score for two players -
user226 - 24.09.2009
i know that after a format, but can tell me in details how to make?
Re: Counting Score for two players -
user226 - 24.09.2009
Peter Corneile [hugu-hosting.co.uk]
Re: Counting Score for two players -
user226 - 24.09.2009
upd
Re: Counting Score for two players -
Correlli - 24.09.2009
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.
}
Re: Counting Score for two players -
user226 - 24.09.2009
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);
}
Re: Counting Score for two players -
Correlli - 24.09.2009
Quote:
Originally Posted by vrootis
no.. i not needed your code.. i needed to example
|
My code IS an example.