Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new PlayerLang[MAX_PLAYERS]=0;
- stock PlayerLanguage(playerid, langid)
- {
- PlayerLang[playerid] = langid;
- return 1;
- }
- stock SendClientMessageLang(playerid, color, msglangid0[], msglangid1[])
- {
- if(PlayerLang[playerid] == 0)
- {
- SendClientMessage(playerid, color, msglangid0);
- }
- else if(PlayerLang[playerid] == 1)
- {
- SendClientMessage(playerid, color, msglangid1);
- }
- return 1;
- }
- stock SendClientMessageToAllLang(color, msglangid0[], msglangid1[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerLang[i] == 0)
- {
- SendClientMessage(i, color, msglangid0);
- }
- else if(PlayerLang[i] == 1)
- {
- SendClientMessage(i, color, msglangid1);
- }
- }
- }
- return 1;
- }
- stock ShowPlayerDialogLang(playerid, dialogid, style, captionlangid0[], captionlangid1[], infolangid0[], infolangid1[], button1langid0[], button1langid1[], button2langid0[], button2langid1[])
- {
- if(PlayerLang[playerid] == 0)
- {
- ShowPlayerDialog(playerid, dialogid, style, captionlangid0, infolangid0, button1langid0, button2langid0);
- }
- else if(PlayerLang[playerid] == 1)
- {
- ShowPlayerDialog(playerid, dialogid, style, captionlangid1, infolangid1, button1langid1, button2langid1);
- }
- return 1;
- }
- stock GameTextForPlayerLang(playerid, strlangid0[], strlangid1[], time, style)
- {
- if(PlayerLang[playerid] == 0)
- {
- GameTextForPlayer(playerid, strlangid0, time, style);
- }
- else if(playerLang[playerid] == 1)
- {
- GameTextForPlayer(playerid, strlangid1, time, style);
- }
- return 1;
- }
- stock GameTextForAllLang(strlangid0[], strlangid1[], time, style)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerLang[i] == 0)
- {
- GameTextForPlayer(i, strlangid0, time, style);
- }
- else if(PlayerLang[i] == 1)
- {
- GameTextForPlayer(i, strlangid1, time, style);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement