[Ajuda] Meu GM tem problemas.
#4

OK, Volte ao Original
pawn Код:
new modelid, Float:X, Float:Y, Float:Z, Float:ang, Cor1, Cor2;
    temp = fopen("Veнculos.rpg", io_readwrite);
    while(fread(temp, tmp, sizeof(tmp), false)) {
        index = 0;
        modelid    = strval(strtok(tmp, index));
        X          = Float:floatstr(strtok(tmp, index));
        Y          = Float:floatstr(strtok(tmp, index));
        Z          = Float:floatstr(strtok(tmp, index));
        ang        = Float:floatstr(strtok(tmp, index));
        Cor1       = strval(strtok(tmp, index));
        Cor2       = strval(strtok(tmp, index));
E coloca isso em seu GM
pawn Код:
stock strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
stock strtokEx(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[64];
    while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply


Messages In This Thread
Meu GM tem problemas. - by Vytor_Games - 24.09.2012, 00:24
Re : Meu GM tem problemas. - by darkturque - 24.09.2012, 00:27
Re: Re : Meu GM tem problemas. - by Vytor_Games - 24.09.2012, 00:33
Re : Meu GM tem problemas. - by darkturque - 24.09.2012, 00:40
Re: Meu GM tem problemas. - by .FuneraL. - 24.09.2012, 00:45
Re: Meu GM tem problemas. - by Vytor_Games - 24.09.2012, 21:00
Re: Meu GM tem problemas. - by Vytor_Games - 25.09.2012, 00:55
Re: Meu GM tem problemas. - by Maklister - 25.09.2012, 01:49
Re: Meu GM tem problemas. - by Vytor_Games - 25.09.2012, 11:00
Re: Meu GM tem problemas. - by Maklister - 26.09.2012, 22:42

Forum Jump:


Users browsing this thread: 1 Guest(s)