Thread: cell parameters
View Single Post
Author Message
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-26-2017 , 05:32   cell parameters
Reply With Quote #1

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:
static cell AMX_NATIVE_CALL send_screen_fadeAMX *, cell pParameters ) {
    if( 
gpGlobals -> time && !FNullEntINT_TO_EDICTpParameters] ) ) ) {
        
MESSAGE_BEGINMSG_ONE_UNRELIABLECMessages.screenfade0ENTINT_TO_EDICTpParameters] ) ) );
        
WRITE_SHORT4096 ); // this parameter
        
WRITE_SHORT2048 ); // this parameter
        
WRITE_SHORT); // and this parameter
        
WRITE_BYTEpParameters] );
        
WRITE_BYTEpParameters] );
        
WRITE_BYTEpParameters] );
        
WRITE_BYTEpParameters] );
        
MESSAGE_END( );
    }

    return 
1;


so i would send the screen fade like:

PHP Code:
public func(index)
{
     
// for exapmle  
     
send_screen_fade(index1.00,600x000025500255// id, float fade, float duration, fade type , color red, green, blue, alpha



__________________

Last edited by ghost95v; 09-26-2017 at 05:44.
ghost95v is offline
Send a message via Skype™ to ghost95v