cell parameters
Hello, i'm wondering how can i put the parameters for the "WriteShort(Float Fade time) and "WriteShort(Float Fade duration)" for the message "ScreenFade" in the code below
so the native in sma code would be -native send_screen_fade(Index, Float:Fade, Float: Duration, Type, Red, Green, Blue, Alpha) PHP Code:
so i would send the screen fade like: PHP Code:
|
Re: cell parameters
Do it just like you would do with any other parameter? Not sure what exactly is the issue here. If you want to get the float value from a parameter you can use amx_ctof function.
|
Re: cell parameters
Yes, yes solved, i just puted like the other parametters
but i still cannot send the "ScreenFade" message with duration and fade time float like : Code:
send_screen_fade(index, 2.00, 0.40....) Code:
send_screen_fade(index, (1<<12), (1<<12), ... Code:
send_screen_fade(index, (1<<12)*2, (1<<12)*4, ... PHP Code:
|
Re: cell parameters
1 << 12 is equal to 4096. So you can multiply 4096 by the number of (floating point) seconds and then round it to the nearest short integer.
|
Re: cell parameters
Thank you i appreciate your advice.
but how can i round it in cpp like this below writted in pawn PHP Code:
|
Re: cell parameters
Search on Google, that's been answered too many times already.
|
All times are GMT -4. The time now is 21:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.