SA-MP Forums Archive
How? - 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)
+--- Thread: How? (/showthread.php?tid=368318)



How? - Riddy - 12.08.2012

How would I do something like:

PlayerInfo[playerid][pLevel] * number, I know it's possible but am not sure how I would do that though.

Yes, i've searched SA-MP forums and ******, no trace (or am searching it with the wrong keywords).


Re: How? - Mauzen - 12.08.2012

PlayerInfo[playerid][pLevel] * number is PlayerInfo[playerid][pLevel] * number, you should explain what exactly is the problem with this.
Also this is a scripting question, and doesnt belong here in the discussion section.


Re: How? - Riddy - 13.08.2012

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
PlayerInfo[playerid][pLevel] * number is PlayerInfo[playerid][pLevel] * number, you should explain what exactly is the problem with this.
Also this is a scripting question, and doesnt belong here in the discussion section.
Ah, I was just asking if I could do something like, Using PlayerInfo[playerid][pLevel] and then using * to times it by a number, is it possible using that PlayerInfo tag and Sorry for posting here, just thought it can be discussed as I wanted to make it so, if you have a social security number it'll give a player like $200 and if the players level higher, it'll times the level by $200, is that a good idea...


Re: How? - Mauzen - 13.08.2012

afaik PlayerInfo is just a normal cell/variable (part of your script). No matter what the tag is, variables are stored as integers, and so you can multiply them as you like. Problems only occur with the Float tag as this refers to a different internal representation of floating point numbers.