[Ajuda] /abastecer Crashando
#1

Bom sempre que vou abastecer o Jogo Crasha ou As VeZes nem da Aparese: Server: Unknow Command
Mais esta funcionando porque aparece: Vocк nгo estб em um veнculo! Quando estou fora do Carro

pawn Code:
if(strcmp(cmd, "/abastecer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
        if(!IsPlayerInAnyVehicle(playerid))
                return SendClientMessage(playerid,COLOR_RED,"   Vocк nгo estб em um veнculo!");

        new vid = GetPlayerVehicleID(playerid);
        if(Gas[vid] >= 100)
                return SendClientMessage(playerid,COLOR_RED,"POSTO: O tanque jб estб cheio.");

            if(IsAtGasStation(playerid))
            {
                GameTextForPlayer(playerid,"~g~B~y~F~b~G~n~~w~Reabastecendo, Aguarde...~",3000,3);
                SetTimer("Fillup",RefuelWait,0);
                Controle(playerid, 0);
                Refueling[playerid] = 1;
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"   Vocк nгo estб em um Posto de Gasolina");
            }
        }
        return true;
    }
Reply
#2

voce tem um ~ no fim

GameTextForPlayer(playerid,"~g~B~y~F~b~G~n~~w~Reab astecendo, Aguarde...~",3000,3);

retire-o, fincando

GameTextForPlayer(playerid,"~g~B~y~F~b~G~n~~w~Reab astecendo, Aguarde...",3000,3);
Reply
#3

Nгo adiantou nada.
Reply
#4

sera isso ai ?

Controle(playerid, 0);
Reply
#5

mostra o code
IsAtGasStation

ja agora porque metes
if(IsPlayerConnected(playerid))
num comando? nao faz muito sentido, se o playerid nao estiver conectado como poderia fazer o comando .
Reply
#6

pawn Code:
public IsAtGasStation(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(15.0,playerid,1941.9850,-1774.6639,19.7006))
        {
            if(IsAPlane(GetPlayerVehicleID(playerid)))
            {
                return true;
            }
        }
        if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906) || PlayerToPoint(6.0,playerid,1400.6882,-1680.5344,42.4339) || PlayerToPoint(6.0,playerid,1496.5316,-1544.0677,23.5481) || PlayerToPoint(6.0,playerid,2737.3364,-1774.2123,43.7973))
        {//LS
            return true;
        }
        else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
        {//LS
            return true;
        }
        else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
        {//SF
            return true;
        }
        else if(PlayerToPoint(6.0,playerid,1380.4712,462.7467,20.1107) || PlayerToPoint(8.0,playerid,1385.0475,460.5417,20.1068))
        {//PC
            return true;
        }
        else if(PlayerToPoint(6.0,playerid,1383.5532,457.1286,19.9561) || PlayerToPoint(8.0,playerid,1379.1952,459.1295,19.9587))
        {//PC
            return true;
        }
        else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
        {//Between LS and SF
            return true;
        }
        else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
        {//LV
            return true;
        }
        else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
        {//LV
            return true;
        }
        else if(PlayerToPoint(8.0,playerid,677.1299,-2866.3892,13.0944) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
        {//LV
            return true;
        }
    }
    return 0;
}
Reply
#7

Alguem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)