16.04.2012, 14:07
PHP код:
format ( szTranslate , sizeof ( szTranslate ) , URL , szTranslateStartEng , szTranslateEndEng , szTranslateText ) ;
HTTP ( playerid , HTTP_GET , szTranslate , "" , "BufferTextTranslate" ) ;
printf ( "%s" , szTranslate ) ;
public BufferTextTranslate ( index , response_code , data [ ] ) {
if ( response_code == 200 ) {
new
szBuffer [ 128 ]
;
format ( szBuffer , sizeof ( szBuffer ) , ""#TEXT_TRANSLATE_SUCCESS": %s" , data ) ;
SendClientMessage ( index , -1 , szBuffer ) ;
} else {
SendClientMessage ( index , -1 , #TEXT_TRANSLATE_FAIL ) ;
printf ( "ERROR: %d" , response_code ) ;
}
}
Код:
[17:53:30] http://translate.******.ru/#en|ru|Hellon...5.14173166[17:53:33] ERROR: 1