!!!
Add
new PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME+1];
// for others not gups
new gPlayers[MAX_PLAYERS][MAX_PLAYER_NAME+1]; // for gups
Add Commands In OnPlayerCommandText
else if(strcmp(cmd,"english", true) == 0) {
SendClientMessage(playerid,COLOR_GREEN," Just Set Language To English ");
Language[playerid] = 1;
return 1;
}
else if(strcmp(cmd,"spainish", true) == 0) {
SendClientMessage(playerid,COLOR_GREEN," Sólo tienes que configurar su idioma Para Spainish");
Language[playerid] = 2;
return 1;
}
else if(strcmp(cmd,"language", true) == 0) {
new xD[123];
format(xD,123," %s 's Langauge, %s ", PlayerName, GetPlayerLanguage(playerid));
SendClientMessageToAll(COLOR_GREEN,xD);
return 1;
}
Add On OnPlayerConnect
if(Language[playerid] == 2) {
new xD[123];
format(xD,123,"%s Conectado al servidor", PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
if(Language[playerid] == 1) {
new xD[123];
format(xD,123,"%s Connect To Server", PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
OnPlayerDisconnect
if(Language[playerid] == 2) {
new xD[123];
format(xD,123,"%s dejado el servidor", PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
if(Language[playerid] == 1) {
new xD[123];
format(xD,123,"%s left the server", PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
OnPlayerSpawn
if(Language[playerid] == 2) {
new xD[123];
format(xD,123,"%s ha generado " , PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
if(Language[playerid] == 1) {
new xD[123];
format(xD,123,"%s Has Spawned" , PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
OnPlayerDeath
if(Language[playerid] == 2) {
new xD[123];
format(xD,123,"%s ha muerto", PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
if(Language[playerid] == 1) {
new xD[123];
format(xD,123,"%s has died", PlayerName[playerid]);
SendClientMessage(playerid,COLOR_RED,xD);
}
Add This In. OnPlayerSpawn, OnPlayerDeath, OnPlayerConnect & OnPlayerDisconnect
GetPlayerName(playerid,PlayerName[playerid],MAX_PLAYER_NAME);
Public To Check Player Language!!
public GetPlayerLanguage(playerid) {
if(Language[playerid] == 0) {
SendClientMessage(playerid,COLOR_RED," Language Default ( English )");
}
if(Language[playerid] == 1) {
SendClientMessage(playerid,COLOR_GREEN," Language : English ");
}
if(Language[playerid] == 2) {
SendClientMessage(playerid,COLOR_BLUE,"Malpas: Spainish");
}
return 1;
}