SA-MP Forums Archive
Something wrong with z cordinate [HELP][REP++] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Something wrong with z cordinate [HELP][REP++] (/showthread.php?tid=501559)



Something wrong with z cordinate [HELP][REP++] - cuemur - 19.03.2014

Something wrong with z cordinate load...


pawn Код:
stock LoadRaceFromFile( const szFileName[ ], const szFileFormat[ ] = ".txt" )
{
    if( !fexist( szFileName ) )
        return 0;
       
    new
        File: fHandle = fopen( szFileName, io_read ),
        szName[ 24 ],
        szLine[ 128 ],
        Float: X, Float: Y, Float: Z,
        iCheckpoints = 0
    ;
       
    strmid( szName, szFileName, 0, cellmax );
    strdel( szName, strfind( szName, szFileFormat), cellmax );
   
    new id = CreateRace( szName, 300 );
   
    while( fread( fHandle, szLine ) )
    {
        if( isnull( szLine ) ) continue;
        unformat( szLine, "'AddCheckpointToRace('p<,>s[24]fff');'", szLine, X, Y, Z );
        AddCheckpointToRace( id, X, Y, Z );
        iCheckpoints++;
    }
    printf( "Race %s has been loaded with %d checkpoints!", szName, iCheckpoints );
    fclose( fHandle );
    return 1;
}
Help!


Re: Something wrong with z cordinate [HELP][REP++] - MP2 - 19.03.2014

Elaborate. And please use [ pawn ] tags, not php.