22.05.2010, 19:12
Код:
SendClientMessageEx(playerid,colore,messaggio[]) { #if MULTILINGUA == 0 SendClientMessage(playerid,colore,messaggio); #else new string[256]; for(new i = 0; i < MAX_LANGUAGE; i++) { new file[256]; format(file,256,"%s%s",LINGUA_PERCORSO,Lingue[i][FileName]); if(dini_Exists(file)) { printf("Lingua %s trovata!",Lingue[i][FileName]); format(string, 256, "%s",dini_Get(file,messaggio)); if(Player[playerid][Lingua]==i) { SendClientMessage(playerid,colore,string); break; } } } #endif } SendClientMessageToAllEx(colore,messaggio[]) { #if MULTILINGUA == 0 SendClientMessageToAll(colore,messaggio); #else new string[256]; for(new i = 0; i < MAX_PLAYERS; i++) { SendClientMessageEx(i,colore,messaggio); } #endif }
Код:
#define MULTILINGUA 1 #if MULTILINGUA == 1 #define LINGUA_PERCORSO "/lingue/" #define MAX_LANGUAGE 2 enum lingue { NomeLingua[100], FileName[100] } new Lingue[][lingue] = { {"italiano","default.lang"}, {"english","english.lang"} }; #endif
i created multylanguage system,i have problem...
"SendClientMessageToAllEx" send message blank, function SendClientMessageEx is correct and works...
Possible cause is
Quote:
%s и entrato nel server=%s has joined the server |
Thx all,and sorry for my english :S...