KiLLeRZoNE Posted November 23, 2011 Report Share Posted November 23, 2011 Deci am incercat sa fac o comanda in mai multe limbi. am facut la fel ca aici: http://www.sa-mp.ro/forum/index.php?topic=11388.0si nu merge ... <img src="http://s15.postimage.org/q6s3fuq4r/snapshotoronthefolldsangdsa.png"> Link to comment Share on other sites More sharing options...
Don.Capone Posted November 23, 2011 Report Share Posted November 23, 2011 ce sa te ajutam daca nu ne zici decat ca vrei ajutor ) I'm back haha ! Link to comment Share on other sites More sharing options...
IcE. Posted November 23, 2011 Report Share Posted November 23, 2011 Posteza codu sau ai lock. Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis! Link to comment Share on other sites More sharing options...
KiLLeRZoNE Posted November 23, 2011 Author Report Share Posted November 23, 2011 Posteza codu sau ai lock.[pawn]// This is a comment// uncomment the line below if you want to write a filterscript//#define FILTERSCRIPT#include <a_samp>enum OptiuniServer {Limba };new Option[OptiuniServer];#if defined FILTERSCRIPTpublic OnFilterScriptInit(){ print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1;}public OnFilterScriptExit(){ return 1;}#elsemain(){ print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n");}#endifpublic OnGameModeInit(){ // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1;}public OnGameModeExit(){ return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, "/cmdtest", true) == 0) { if(Option[Limba] ==1)SendClientMessage(playerid, 0xFFFFFFAA, "** Salut George ce faci?");else // Romana if(Option[Limba] ==2)SendClientMessage(playerid, 0xFFFFFFAA, "** Hi Tom how are you?");else // Engleza if(Option[Limba] ==3)SendClientMessage(playerid, 0xFFFFFFAA, "** Hola Xavi que passa?"); // Spaniola // s.a.m.d cate limbi doriti voi return 1; } return 0;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == 1996) { if(response) { if(listitem == 0) { Option[Limba] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "** Ai selectat limba romana."); } if(listitem == 1) { Option[Limba] = 2; SendClientMessage(playerid, 0xFFFFFFAA, "** You have selected enghlish language."); } if(listitem == 2) { Option[Limba] = 3; SendClientMessage(playerid, 0xFFFFFFAA, "** Lengua española se ha seleccionado."); } } } return 1;}[/pawn] <img src="http://s15.postimage.org/q6s3fuq4r/snapshotoronthefolldsangdsa.png"> Link to comment Share on other sites More sharing options...
IstuntmanI Posted November 24, 2011 Report Share Posted November 24, 2011 Normal ca nu merge, daca nu ai bagat sa se seteze la inceput o limba default ... nici macar nu arati acel dialog de selectare a limbii + e facut sa fie doar limba la server aia, nu limba la fiecare jucator.http://wiki.sa-mp.com/wiki/ShowPlayerDialogTi-am facut eu cum trebuie, modifica acel cod in asta:#include <a_samp> enum OptiuniServer { Limba }; new Option[ MAX_PLAYERS ][OptiuniServer]; main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } public OnGameModeInit() { SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnGameModeExit() { return 1; } public OnPlayerConnect( playerid ) { Option[ playerid ][ Limba ] = 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/cmdtest", true) == 0) { if(Option[playerid][Limba] ==1)SendClientMessage(playerid, 0xFFFFFFAA, "** Salut George ce faci?");else // Romana if(Option[playerid][Limba] ==2)SendClientMessage(playerid, 0xFFFFFFAA, "** Hi Tom how are you?");else // Engleza if(Option[playerid][Limba] ==3)SendClientMessage(playerid, 0xFFFFFFAA, "** Hola Xavi que passa?"); // Spaniola // s.a.m.d cate limbi doriti voi return 1; } if( strcmp( cmdtext, "/language", true ) == 0 ) { ShowPlayerDialog( playerid, 1996, DIALOG_STYLE_LIST, "Limba", "Romana\nEnglish\nSpanish", "Select", "Cancel" ); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1996) { if( !response ) return 1; if(listitem == 0) { Option[playerid][Limba] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "** Ai selectat limba romana."); } if(listitem == 1) { Option[playerid][Limba] = 2; SendClientMessage(playerid, 0xFFFFFFAA, "** You have selected enghlish language."); } if(listitem == 2) { Option[playerid][Limba] = 3; SendClientMessage(playerid, 0xFFFFFFAA, "** Lengua española se ha seleccionado."); } } return 1; }Comanda /language adaugata, ca sa-ti alegi limba. Ca sa adaugi mesaje fa ca in /testcmds, mai simplu ai creea o functie SendLanguageMessage( playerid, color, ro[], eng[], spanish[] ). Link to comment Share on other sites More sharing options...
KiLLeRZoNE Posted November 24, 2011 Author Report Share Posted November 24, 2011 stuntman[]!" post="100839" timestamp="1322152537"]Normal ca nu merge, daca nu ai bagat sa se seteze la inceput o limba default ... nici macar nu arati acel dialog de selectare a limbii + e facut sa fie doar limba la server aia, nu limba la fiecare jucator.http://wiki.sa-mp.com/wiki/ShowPlayerDialogTi-am facut eu cum trebuie, modifica acel cod in asta:#include <a_samp> enum OptiuniServer { Limba }; new Option[ MAX_PLAYERS ][OptiuniServer]; main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } public OnGameModeInit() { SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnGameModeExit() { return 1; } public OnPlayerConnect( playerid ) { Option[ playerid ][ Limba ] = 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/cmdtest", true) == 0) { if(Option[playerid][Limba] ==1)SendClientMessage(playerid, 0xFFFFFFAA, "** Salut George ce faci?");else // Romana if(Option[playerid][Limba] ==2)SendClientMessage(playerid, 0xFFFFFFAA, "** Hi Tom how are you?");else // Engleza if(Option[playerid][Limba] ==3)SendClientMessage(playerid, 0xFFFFFFAA, "** Hola Xavi que passa?"); // Spaniola // s.a.m.d cate limbi doriti voi return 1; } if( strcmp( cmdtext, "/language", true ) == 0 ) { ShowPlayerDialog( playerid, 1996, DIALOG_STYLE_LIST, "Limba", "Romana\nEnglish\nSpanish", "Select", "Cancel" ); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1996) { if( !response ) return 1; if(listitem == 0) { Option[playerid][Limba] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "** Ai selectat limba romana."); } if(listitem == 1) { Option[playerid][Limba] = 2; SendClientMessage(playerid, 0xFFFFFFAA, "** You have selected enghlish language."); } if(listitem == 2) { Option[playerid][Limba] = 3; SendClientMessage(playerid, 0xFFFFFFAA, "** Lengua española se ha seleccionado."); } } return 1; }Comanda /language adaugata, ca sa-ti alegi limba. Ca sa adaugi mesaje fa ca in /testcmds, mai simplu ai creea o functie SendLanguageMessage( playerid, color, ro[], eng[], spanish[] ).ms mult..... <img src="http://s15.postimage.org/q6s3fuq4r/snapshotoronthefolldsangdsa.png"> Link to comment Share on other sites More sharing options...
Question
KiLLeRZoNE
Deci am incercat sa fac o comanda in mai multe limbi. am facut la fel ca aici: http://www.sa-mp.ro/forum/index.php?topic=11388.0
si nu merge ...
<img src="http://s15.postimage.org/q6s3fuq4r/snapshotoronthefolldsangdsa.png">
Link to comment
Share on other sites
5 answers to this question
Recommended Posts