How can i load from file - RemoveBuildingForPlayer ?
#4

Quote:
Originally Posted by kirollos
Посмотреть сообщение
i made a simple one hope it works:

pawn Код:
stock RemoveObjectsFromFile(filename[], playerid)
{
    new File:file = fopen(filename, io_read);
   
    new line[100];
   
    while(fread(file, line))
    {
        new modelid, Float:fx, Float:fy, Float:fz, Float:fRadius;
       
        sscanf(line, "p<,>iffff", modelid, fx, fy, fz, fRadius);
       
        RemoveBuildingForPlayer(playerid, modelid, fx, fy, fz, fRadius);
    }
    return 1;
}
example for what you will write inside the file:

Код:
3573,1798.6484,-2057.9141,14.9844,0.25
5086,1892.5391,-2012.8281,21.3750,0.25
6130,1117.5859,-1490.0078,32.7188,0.25
6255,1117.5859,-1490.0078,32.7188,0.25
762,1175.3594,-1420.1875,19.8828,0.25
615,1166.3516,-1417.6953,13.9531,0.25
8229,1142.0313,1362.5000,12.4844,0.25
8740,2798.6328,1246.6641,17.1094,0.25
8741,2842.5781,1290.7891,16.1406,0.25
8740,2798.6328,1246.6641,17.1094,0.25
8741,2842.5781,1290.7891,16.1406,0.25
8578,2798.6328,1246.6641,17.1094,0.25
963,2842.0000,1252.5469,11.4453,0.25
963,2855.8125,1267.0391,11.4453,0.25
963,2842.0000,1276.3047,11.4453,0.25
8575,2842.5781,1290.7891,16.1406,0.25
956,2845.7266,1295.0469,10.7891,0.25
962,2855.8125,1314.6250,11.4453,0.25
962,2842.0000,1324.0391,11.4453,0.25
962,2842.0000,1303.9766,11.4453,0.25
where synatx is

Код:
MODELID|X|Y|Z|RADIUS
Thanks man, your awsome.
I will try to rep you up.
Reply


Messages In This Thread
How can i load from file - RemoveBuildingForPlayer ? - by sKgaL - 21.06.2013, 15:56
Re: How can i load from file - RemoveBuildingForPlayer ? - by Kirollos - 21.06.2013, 16:13
Respuesta: How can i load from file - RemoveBuildingForPlayer ? - by JustBored - 21.06.2013, 16:13
Re: How can i load from file - RemoveBuildingForPlayer ? - by sKgaL - 22.06.2013, 03:59

Forum Jump:


Users browsing this thread: 1 Guest(s)