[Coders] Time Limit

Results 1 to 1 of 1
  1. #1
    Valued Member a1tl4 is offline
    MemberRank
    Sep 2012 Join Date
    BrazilLocation
    112Posts

    [Coders] Time Limit

    I want add time limit in my function example:
    (Its works but when people change character or relog the sender is different)
    PHP Code:
    void MMatchServer_OnCommandAPMCommandpCmd ){
    // [ ... ]
        
    if( pCommand->GetId() == MYPACKET ){
            if( 
    timeGetTime() - pSender->dwTime 1800000 ){
                
    pSender->dwTime timeGetTime();
                for( 
    auto i =[...]; i++ ){
                    
    // my stuff
                
    }
            }else{
                
    RouteToPlayerpSender"You can only use this command every 30 minutes." );
            }
        }

    I could limit time also with: pSender->m_szIP but didn't have idea how to make.
    I'm using 2008 client.

    Fixed. //
    Last edited by a1tl4; 22-11-13 at 04:04 PM.




Advertisement