GM with two languages
#1

Hi all, i've got a little problem with the scripting of my gm. I want to made it with two languages, but i want to find the best way to do this.
I've used something like this:
pawn Код:
switch(language[playerid]) {
            case 0: {
            SendClientMessage(playerid,COLOR_GREEN,"*** Ciao!"); }
            case 1: {
            SendClientMessage(playerid,COLOR_GREEN,"*** Hello!"); } }
But i've got a problem with return, because i think it will cause a lot of lag 'cause i have to repeat the same script twice or three times in each command :
pawn Код:
COMMAND:fix(playerid,params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "*** Non sei in un veicolo!");
    if(cookies[playerid] <= 0) return SendClientMessage(playerid,COLOR_RED, "*** Sei senza soldi!");
    new vehicleid = GetPlayerVehicleID(playerid);
    SetVehicleHealth(vehicleid, 1000.0);
    RepairVehicle(vehicleid);
    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
    GivePlayerMoney(playerid,-100);
    SendClientMessage(playerid, COLOR_GREEN, "*** Il tuo veicolo и stato riparato pagando 100$!");
    return 1;
}
Do you know a better way? Thanks
Reply


Messages In This Thread
GM with two languages - by ReshiramZekrom - 04.01.2014, 14:09
Re: GM with two languages - by Wizza - 04.01.2014, 14:35
Re: GM with two languages - by ReshiramZekrom - 04.01.2014, 15:49
Re: GM with two languages - by InfiniTy. - 04.01.2014, 15:53
Re: GM with two languages - by tyler12 - 04.01.2014, 15:54
Re: GM with two languages - by ReshiramZekrom - 04.01.2014, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)