traveled distance save
#9

PHP код:
stock kmsaver(id,vehicleid)
{
    new
    
FloatOldPos MAX_PLAYERS ] [ ] ,
        
FloatDistanceKM MAX_PLAYERS ] ;
    
OldPos id ] [ ] = VehicleOPos id ] [ ] ;
    
OldPos id ] [ ] = VehicleOPos id ] [ ] ;
    
OldPos id ] [ ] = VehicleOPos id ] [ ] ;
    
GetPlayerPos id VehicleOPos id ] [ ] , VehicleOPos id ] [ ] , VehicleOPos id ] [ ] ) ;
    
DistanceKM id ] = GetDistanceBetweenPoints1 OldPos id ] [ ] , OldPos id ] [ ] , OldPos id ] [ ] , VehicleOPos id ] [ ] , VehicleOPos id ] [ ] , VehicleOPos id ] [ ] ) ;
    
VehicleInfo[vehicleid][vMegtettUt] += DistanceKM id ] / 1000 ;
    return 
1;

PHP код:
forward Float:GetDistanceBetweenPoints1 FloatOldX FloatOldY FloatOldZ FloatNewX FloatNewY FloatNewZ ) ;
public 
Float:GetDistanceBetweenPoints1 FloatOldX FloatOldY FloatOldZ FloatNewX FloatNewY FloatNewZ ) {
        return 
floatsqroot floatpower floatabs floatsub NewX OldX ) ) , ) + floatpower floatabs floatsub NewY OldY ) ) , ) +floatpower floatabs floatsub NewZ OldZ ) ) , ) ) ;

OnPlayerStateChange if(newstate == 2):
PHP код:
        SetPVarInt(playerid"kmsaver1"SetTimerEx("kmsaver"100true"i"playerid)); 
why its alwasy 0.0? its not workin for me:/
Reply


Messages In This Thread
traveled distance save - by n00el - 12.05.2014, 17:04
Re: traveled distance save - by DiGiTaL_AnGeL - 12.05.2014, 17:09
Re: traveled distance save - by n00el - 12.05.2014, 17:11
Re: traveled distance save - by Koala818 - 12.05.2014, 17:17
Re: traveled distance save - by n00el - 12.05.2014, 17:25
Re: traveled distance save - by Koala818 - 12.05.2014, 17:29
Re: traveled distance save - by n00el - 12.05.2014, 17:36
Re: traveled distance save - by Koala818 - 12.05.2014, 17:45
Re: traveled distance save - by n00el - 12.05.2014, 21:19
Re: traveled distance save - by n00el - 13.05.2014, 12:35

Forum Jump:


Users browsing this thread: 1 Guest(s)