[Ajuda] Bug no comando de spawn de moto
#1

Quando digito '/moto' ela aparece, porйm, quando outro player digita depois, ela desaparece e aparece com ele oO

pawn Код:
CMD:moto(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid)) {
        return SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Vocк jб estб em um veнculo");
    }
    playermoney = GetPlayerMoney(playerid);
    if(playermoney > 1000) {
        if(carro[playerid] != -1) DestroyVehicle(carro[playerid]);
        new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
        GetPlayerPos(playerid, var0, var1, var2);
        GetPlayerFacingAngle(playerid, var3);
        GivePlayerMoney(playerid,-1000);
        SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Vocк gastou $ 1.000,00 pelo veнculo.");
        if(policial[playerid]==1){carro[playerid] = CreateVehicle(523, var0 + 1, var1 + 1, var2, var3, 103, 1, 60); return PutPlayerInVehicle(playerid, carro[playerid], 0);}
        if(Sexo[playerid]==1){carro[playerid] = CreateVehicle(522, var0 + 1, var1 + 1, var2, var3, 103, 1, 60);}
        if(Sexo[playerid]==2){carro[playerid] = CreateVehicle(522, var0 + 1, var1 + 1, var2, var3, 126, 1, 60);}
        PutPlayerInVehicle(playerid, carro[playerid], 0);
    }
    else {
        SendClientMessage(playerid, cinza, "[SERVER] Vocк nгo tem dinheiro suficiente");
    }
    return 1;
}
Reply
#2

pawn Код:
CMD:moto(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid)) {
        return SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Vocк jб estб em um veнculo");
    }
    playermoney = GetPlayerMoney(playerid);
    if(playermoney > 1000) {
        if(carro[playerid]) DestroyVehicle(carro[playerid]);
        new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
        GetPlayerPos(playerid, var0, var1, var2);
        GetPlayerFacingAngle(playerid, var3);
        GivePlayerMoney(playerid,-1000);
        SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Vocк gastou $ 1.000,00 pelo veнculo.");
        if(policial[playerid]==1){carro[playerid] = CreateVehicle(523, var0 + 1, var1 + 1, var2, var3, 103, 1, 60); return PutPlayerInVehicle(playerid, carro[playerid], 0);}
        if(Sexo[playerid]==1){carro[playerid] = CreateVehicle(522, var0 + 1, var1 + 1, var2, var3, 103, 1, 60);}
        if(Sexo[playerid]==2){carro[playerid] = CreateVehicle(522, var0 + 1, var1 + 1, var2, var3, 126, 1, 60);}
        PutPlayerInVehicle(playerid, carro[playerid], 0);
    }
    else {
        SendClientMessage(playerid, cinza, "[SERVER] Vocк nгo tem dinheiro suficiente");
    }
    return 1;
}
Reply
#3

Apenas identei o Code do BlackDonelli \/

pawn Код:
CMD:moto(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        return SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Vocк jб estб em um veнculo");
    }
    playermoney = GetPlayerMoney(playerid);
    if(playermoney > 1000)
    {
        if(carro[playerid]) DestroyVehicle(carro[playerid]);
        new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
        GetPlayerPos(playerid, var0, var1, var2);
        GetPlayerFacingAngle(playerid, var3);
        GivePlayerMoney(playerid,-1000);
        SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Vocк gastou $ 1.000,00 pelo veнculo.");
        if(policial[playerid]==1){carro[playerid] = CreateVehicle(523, var0 + 1, var1 + 1, var2, var3, 103, 1, 60); return PutPlayerInVehicle(playerid, carro[playerid], 0);}
        if(Sexo[playerid]==1){carro[playerid] = CreateVehicle(522, var0 + 1, var1 + 1, var2, var3, 103, 1, 60);}
        if(Sexo[playerid]==2){carro[playerid] = CreateVehicle(522, var0 + 1, var1 + 1, var2, var3, 126, 1, 60);}
        PutPlayerInVehicle(playerid, carro[playerid], 0);
    }
    else
    {
        SendClientMessage(playerid, cinza, "[SERVER] Vocк nгo tem dinheiro suficiente");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)