SAMP Multiplication
#2

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(pInfo[killerid][pStreak] >= 18)
    {

	    format(string,sizeof(string),"%s is on a killstreak of %i!",pName(killerid),pInfo[killerid][pStreak]);
	
            SendClientMessageToAll(COLOR_GREEN,string);

            GivePlayerMoney(killerid, GetPlayerMoney(killerid) * 1000);
     }
     else
     {
	    format(string,sizeof(string),"%s is on a killstreak of %i!",pName(killerid),pInfo[killerid][pStreak]);
	
            SendClientMessageToAll(COLOR_GREEN,string);

            GivePlayerMoney(killerid, GetPlayerMoney(killerid) + 1000);
      }
That section of code would mean if the killer had the pStreak multidimentional value of 18+ there amount of cash would be CURRENT AMOUNT * 1000 and if they had the pStreak of < 18 then it would be CURRENT AMOUNT + 1000. I think that's what you wanted anyway?
Reply


Messages In This Thread
SAMP Multiplication - by Shockey HD - 06.08.2012, 22:26
Re: SAMP Multiplication - by Christopher - 06.08.2012, 23:13

Forum Jump:


Users browsing this thread: 1 Guest(s)