21.11.2014, 20:40
Help me...
How may i read this file
I have tried this but dosent work, can you help me to fix it
How may i read this file
Код:
50.0,SomeName
pawn Код:
CMD:read(playerid)
{
new Float:HP, Name[MAX_PLAYER_NAME], str[250];
new File:file = fopen("Test.txt", io_read);
while(fread(file, str))
{
sscanf(str, "p<,>fs", HP, Name);
SetPlayerName(playerid, Name);
SetPlayerHealth(playerid, HP);
}
fclose(file);
return 1;
}