any way to multiply - 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: any way to multiply (
/showthread.php?tid=71432)
any way to multiply -
hazdog - 01.04.2009
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
Re: any way to multiply -
Shellegg - 01.04.2009
the symbol, " x " of multiplication in pawno its used the " * " i think
Try changing that
Re: any way to multiply -
FUNExtreme - 01.04.2009
Quote:
Originally Posted by Shellegg
the symbol, " x " of multiplication in pawno its used the " * " i think
Try changing that
|
Your right.
Re: any way to multiply -
hazdog - 01.04.2009
cheers guys