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_OnCommandAP( MCommand* pCmd ){
// [ ... ]
if( pCommand->GetId() == MYPACKET ){
if( timeGetTime() - pSender->dwTime > 1800000 ){
pSender->dwTime = timeGetTime();
for( auto i =[...]; i++ ){
// my stuff
}
}else{
RouteToPlayer( pSender, "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. //