Jump to content
  • 0

Ro/Eng


Deejaybwg

Question

9 answers to this question

Recommended Posts

Setezi o variabila care sa fie limba, la 0 pentru engleza, 1 pentru romana, si pui functia asta:

stock SendClientLanguageMessage( playerid, color, eng[ ], ro[ ] )
{
    switch( Language[ playerid ] )
    {
         case 0: SendClientMessage( playerid, color, eng );
         case 1: SendClientMessage( playerid, color, ro );
    }
    return 1;
}
Si in loc de (exemplu)
SendClientMessage( playerid, COLOR_WHITE, "Ce faci ?" );
folosesti
SendClientLanguageMessage( playerid, COLOR_WHITE, "What are you doing ?", "Ce faci ?" );

Sper ca te-ai prins ...

PS: La /ro pui Language[ playerid ] = 1, iar la /eng pui Language[ playerid ] = 0;

Link to comment
Share on other sites

stuntman-=!!" post="78083" timestamp="1308428845"]

Setezi o variabila care sa fie limba, la 0 pentru engleza, 1 pentru romana, si pui functia asta:

stock SendClientLanguageMessage( playerid, color, eng[ ], ro[ ] )
{
    switch( Language[ playerid ] )
    {
         case 0: SendClientMessage( playerid, color, eng );
         case 1: SendClientMessage( playerid, color, ro );
    }
    return 1;
}
Si in loc de (exemplu)
SendClientMessage( playerid, COLOR_WHITE, "Ce faci ?" );
folosesti
SendClientLanguageMessage( playerid, COLOR_WHITE, "What are you doing ?", "Ce faci ?" );
Sper ca te-ai prins ... PS: La /ro pui Language[ playerid ] = 1, iar la /eng pui Language[ playerid ] = 0;
stock SendClientLanguageMessage( playerid, color, eng[ ], ro[ ] ) {     switch( Language[ playerid ] )     {         case 0: SendClientMessage( playerid, color, eng );         case 1: SendClientMessage( playerid, color, ro );     }     return 1; Asta pun in GM ? SendClientMessage( playerid, COLOR_WHITE, "Ce faci ?" ); folosesti SendClientLanguageMessage( playerid, COLOR_WHITE, "What are you doing ?", "Ce faci ?" ); Asta unde pun? La /ro pui Language[ playerid ] = 1, iar la /eng pui Language[ playerid ] = 0; Si asta unde pun?

www.youtube.com/thebwgg

Link to comment
Share on other sites

sau mai usor faci o variabila de ex:

Lang[MAX_PLAYERS];
si dupa aceea pui la OnPlayerConnect
ShowPlayerDialog(playerid,LANG,DIALOG_STYLE_MSGBOX"Limba","Te rugam selecteaza limba inainte de a te spawma!","Romana","English");
dupa aceea in varful scriptului:
#define LANG 1000
si dupa aceea pui la OnDialogResponse
if(dialogid==LANG)
{
if(response)
{
SendClientMessage(playerid, COLOR_ORANGE,"Ai selectat limba romana [RO]");
Lang[playerid] = 1;
}else
{
SendClientMessage(playerid, COLOR_ORANGE,"You set language English[ENG]");
Lang[playerid] = 0;
}
}

si daca o sa vrei sa pui in SendClientMessage pui:

if(Lang[playerid] = 0) SendClientMessage(playerid,etc..etc...cam atat...

Fara reclama in semnatura!

Link to comment
Share on other sites

Am facut cum mi-a zis Speedy si..

D:\[RSG]\Gamemodes\RSG.pwn(2773) : error 001: expected token: ",", but found "-string-"

D:\[RSG]\Gamemodes\RSG.pwn(2773) : warning 215: expression has no effect

D:\[RSG]\Gamemodes\RSG.pwn(2773) : warning 215: expression has no effect

D:\[RSG]\Gamemodes\RSG.pwn(2773) : warning 215: expression has no effect

D:\[RSG]\Gamemodes\RSG.pwn(2773) : warning 215: expression has no effect

D:\[RSG]\Gamemodes\RSG.pwn(2773) : error 001: expected token: ";", but found ")"

D:\[RSG]\Gamemodes\RSG.pwn(2773) : error 029: invalid expression, assumed zero

D:\[RSG]\Gamemodes\RSG.pwn(2773) : fatal error 107: too many error messages on one line

Linia 2773: ShowPlayerDialog(playerid,LANG,DIALOG_STYLE_MSGBOX"Limba","Este necesara selectarea limbii.","Romana","English");

www.youtube.com/thebwgg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.