any way to multiply
#1

hey hey;

im looking for a way for pawno to kinda do an equation...

at the end of a round i need the playto be given money.

FORMULA: (KILLS x 100) - (TeamKills x 10) + (winbonus if there team wins [$1000])

current code i have:


Code:
for(new i; i<MAX_PLAYERS; i++)
  {
		Team[i] = TEAM_none;
		if(win[0] == 1 && Team[i] == TEAM_green)
		{
			SendClientMessage(i,GROVE_COLOR,"-----YOUR SCORECARD----");
      format(string, sizeof(string), "Kills: %d", PlayerInfo[i][DMKILL]);
      format(string2, sizeof(string2), "Team-Kills: %d", PlayerInfo[i][TK]);
      SendClientMessage(i,GROVE_COLOR,string);
      SendClientMessage(i,GROVE_COLOR,string2);
      SendClientMessage(i,GROVE_COLOR,"Win Bonus: 1000");
      SendClientMessage(i,GROVE_COLOR,"MONEY EARNED = (kills x 100) - (Teamkills x 10) + WinBonus");
      format(string3, sizeof(string3), "MONEY EARNED = %d - %d + 1000", PlayerInfo[i][DMKILL]+100, PlayerInfo[i][TK]+10);
      SendClientMessage(i,GROVE_COLOR,string3);
			GivePlayerMoney(i,PlayerInfo[i][DMKILL]+100 - PlayerInfo[i][TK]+10 + 1000);
i tried putting multiplys instead of pluses, but it gets undefined symbol... is thany function for timesing around? ((sorry if there is and i havent checked the wiki))


cheers,

hazdog
Reply
#2

the symbol, " x " of multiplication in pawno its used the " * " i think

Try changing that
Reply
#3

Quote:
Originally Posted by Shellegg
the symbol, " x " of multiplication in pawno its used the " * " i think

Try changing that
Your right.
Reply
#4

cheers guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)