SA-MP Forums Archive
Faculty in PAWN - 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: Faculty in PAWN (/showthread.php?tid=396105)



Faculty in PAWN - Jochemd - 29.11.2012

Is it somehow possible to use the faculty in PAWN? I personally was thinking of something like this...

pawn Код:
new total = !5;
... but I am quite sure it will error.

If it's not possible, I'll soon release an easy stock for it.


Re: Faculty in PAWN - GiamPy. - 29.11.2012

Yes, it's possible.


Re: Faculty in PAWN - Jochemd - 29.11.2012

Quote:
Originally Posted by GiamPy.
Посмотреть сообщение
Yes, it's possible.
Yes, it's possible with stock as far as I know (quite easy), but is there a native way?


Re: Faculty in PAWN - GiamPy. - 29.11.2012

What exactly would you like to do?
I just tried and it doesn't give me any error, anyway.


Re: Faculty in PAWN - Jochemd - 29.11.2012

pawn Код:
new integ = !5;
printf("integ = %d",integ);
"integ = 0"


Re: Faculty in PAWN - GiamPy. - 29.11.2012

If you explain me what exactly would you like to do, I could help you.


Re: Faculty in PAWN - Jochemd - 29.11.2012

Quote:
Originally Posted by GiamPy.
Посмотреть сообщение
If you explain me what exactly would you like to do, I could help you.
Do you actually have any clue what the faculty is?


Re: Faculty in PAWN - GiamPy. - 29.11.2012

It's a math function.
I don't think SA:MP has a native for it.


Re: Faculty in PAWN - Jochemd - 29.11.2012

Excuse me, translation fail. I was talking about the factorial.

factorial 5 = 5*4*3*2*1

http://forum.sa-mp.com/showpost.php?...&postcount=911


Re: Faculty in PAWN - GiamPy. - 29.11.2012

As far as I know, SA:MP hasn't got a native function for it.
Using a stock would be the same thing, just use it whenever you need to and you're fine, wouldn't you?