[HELP] Urgentasso!
#7

pawn Код:
new
    Float:Cos[MAX_PLAYERS][3],
    Float:Gas[MAX_VEHICLES];

UpdateGas();
public UpdateGas()
{
    for(new x = 0,y = GetMaxPlayers(); x != y; x++)
    {
        if(!IsPlayerConnected(x)) goto NEXT;
       
        if(IsPlayerInAnyVehicle(x))
        {
            new
                Float:Fts[3];
               
            GetPlayerPos(x,Fts[0],Fts[1],Fts[2]);
            if((floatsqroot(floatpower(Cos[x][0] - Fts[0],2) + floatpower(Cos[x][1] - Fts[1],2) + floatpower(Cos[x][2] - Fts[2],2))) >= 5) Gas[GetPlayerVehicleID(x)] -= 0.1;
           
            if(Gas[GetPlayerVehicleID(x)] < 1.1)
            //fazaqui
            Cos[x][0] = Fts[0];
            Cos[x][1] = Fts[1];
            Cos[x][2] = Fts[2];
        }
        NEXT:
    }
    return 1;
}
toma ai bruno.
Reply


Messages In This Thread
[HELP] Urgentasso! - by Bruno Pereira - 23.08.2011, 20:36
Re: [HELP] Urgentasso! - by Lуs - 23.08.2011, 20:43
Re: [HELP] Urgentasso! - by Bruno Pereira - 23.08.2011, 21:17
Re: [HELP] Urgentasso! - by Lуs - 23.08.2011, 21:20
Re: [HELP] Urgentasso! - by [R] ousenber [K] - 23.08.2011, 21:28
Re: [HELP] Urgentasso! - by Bruno Pereira - 23.08.2011, 21:35
Re: [HELP] Urgentasso! - by [S]trong - 23.08.2011, 21:47
Re: [HELP] Urgentasso! - by Cristhian - 23.08.2011, 22:02
Re: [HELP] Urgentasso! - by [S]trong - 23.08.2011, 22:08
Re: [HELP] Urgentasso! - by CyNiC - 23.08.2011, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)