[GameMode] Base RPG para Mysql r39-2
#9

Ora bem Cleyson, a sua ideia nгo й ma porem o seu conteъdo tem de ser melhorado.

pawn Код:
SetTimer("Velocimetro", 500, 1);
Um velocнmetro deve ser chamado atravйs de SetTimerEx para um playerid especifico porque como vocк sabe a informaзгo a mostrar para o cliente nгo й igual para todos, quando ele entra em um carro ( use OnPlayerStateChange para verificar isso).

Fazendo desta forma:

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
        Motor[i] = TextDrawCreate(142.000000, 419.000000, "");
        TextDrawBackgroundColor(Motor[i], 255);
        TextDrawFont(Motor[i], 2);
        TextDrawLetterSize(Motor[i], 0.300000, 1.600000);
        TextDrawColor(Motor[i], -1);
        TextDrawSetOutline(Motor[i], 1);
        TextDrawSetProportional(Motor[i], 1);
   
        Combust[i] = TextDrawCreate(141.000000, 401.000000, " ");
        TextDrawBackgroundColor(Combust[i], 255);
        TextDrawFont(Combust[i], 2);
        TextDrawLetterSize(Combust[i], 0.160000, 2.100000);
        TextDrawColor(Combust[i], -1);
        TextDrawSetOutline(Combust[i], 1);
        TextDrawSetProportional(Combust[i], 1);

        Velo[i] = TextDrawCreate(140.000000, 364.000000, " ");
        TextDrawBackgroundColor(Velo[i], 255);
        TextDrawFont(Velo[i], 2);
        TextDrawLetterSize(Velo[i], 0.599999, 4.699997);
        TextDrawColor(Velo[i], -1);
        TextDrawSetOutline(Velo[i], 1);
        TextDrawSetProportional(Velo[i], 1);

        Kmh[i] = TextDrawCreate(187.000000, 378.000000, "  ~y~KM~i~/~y~H");
        TextDrawBackgroundColor(Kmh[i], 255);
        TextDrawFont(Kmh[i], 2);
        TextDrawLetterSize(Kmh[i], 0.190000, 2.799999);
        TextDrawColor(Kmh[i], -1);
        TextDrawSetOutline(Kmh[i], 1);
        TextDrawSetProportional(Kmh[i], 1);

        Veiculo[i] = TextDrawCreate(141.000000, 360.000000, " ");
        TextDrawBackgroundColor(Veiculo[i], 255);
        TextDrawFont(Veiculo[i], 2);
        TextDrawLetterSize(Veiculo[i], 0.250000, 1.200000);
        TextDrawColor(Veiculo[i], -1);
        TextDrawSetOutline(Veiculo[i], 1);
        TextDrawSetProportional(Veiculo[i], 1);
    }
vocк nгo faz a mнnima ideia da quantidade de "slots" de textdraws que vocк esta a desperdiзar, nestes casos usa-se Player Textdraw (CreatePlayerTextDraw).

Quanto ao uso de MySQL nгo poderei entrar muito em especifico porque ate no SA-MP uso SQLite, contudo posso ver que deverias optimizar mais as tuas query's.

O script poderia ser melhorado й certo contudo jб vi piores aqui na board de gente de "rank" maior que o seu, mas como mais uma vez й provado o "rank" nгo significa nada aqui.
Reply


Messages In This Thread
Base RPG para Mysql r39-2 - by Cleyson - 24.01.2015, 20:40
Re: Base RPG para Mysql r39-2 - by LucaAllexandre - 24.01.2015, 20:54
Re: Base RPG para Mysql r39-2 - by NexNix - 24.01.2015, 20:56
Re: Base RPG para Mysql r39-2 - by AlucardSnow - 24.01.2015, 21:03
Re: Base RPG para Mysql r39-2 - by Nenzittow - 24.01.2015, 21:05
Re: Base RPG para Mysql r39-2 - by Cleyson - 24.01.2015, 21:11
Re: Base RPG para Mysql r39-2 - by PaulMcCartney - 24.01.2015, 21:18
Re: Base RPG para Mysql r39-2 - by AdesxXx - 24.01.2015, 22:10
Re: Base RPG para Mysql r39-2 - by PT - 24.01.2015, 22:39
Re: Base RPG para Mysql r39-2 - by Adejair_Junior - 24.01.2015, 23:15

Forum Jump:


Users browsing this thread: 2 Guest(s)