[HELP]: How these codes can be load to ongamemodeinit ?
#1

Solved.
Reply
#2

Is there any help please ?
Reply
#3

https://sampwiki.blast.hk/wiki/File_Functions scroll down and you will find a quick-tutorial about reading from a file.
Reply
#4

I already did look this tutorial but i couldn't.Please help me !
Reply
#5

I think you need Y_hooks

I am actually not quite sure if it will work.

pawn Код:
public OnPlayerCommandText(playerid,params[])
{
//Your commands
hook OnGameModeInIt()
{
 new type[128],typeone[1024],factions,typetwo[1024];
    for(new i;i<M_FACTION;i++)
{
    format(type,sizeof(type),"factions/%i.ini",i);
    if(fexist(type))
{
    new numb[7][48];
    new File:file = fopen(type,io_read);
    while(fread(file,typeone,600))
{
    split(typeone,numb,',');
    format(FactionsInformationi[factions][tFactionName],600,"%s",numb[0]);
    FactionsInformationi[factions][FactionID] = strval(numb[1]);
    FactionsInformationi[factions][FactionX] = floatstr(numb[2]);
    FactionsInformationi[factions][FactionY] = floatstr(numb[3]);
    FactionsInformationi[factions][FactionZ] = floatstr(numb[4]);
    format(FactionsInformationi[factions][FactionTypei],600,"%s",numb[5]);
    FactionsInformationi[factions][FactionWeapon] = strval(numb[6]);
}
    format(typetwo,sizeof(typetwo),"Faction Name %s\nFaction ID: %i\nFaction Information: %s",FactionsInformation[factions][FactionName],FactionsInformation[factions][FactionID],FactionsInformation[factions][FactionType]);
    Create3DTextLabel(typetwo, 0x008080FF, FactionsInformation[factions][FactionX], FactionsInformation[factions][FactionY], FactionsInformation[factions][FactionZ], 40.0, 0, 0);
}
}
}
}
Reply
#6

I'm using i/o.Still it doesn't work.
Reply
#7

Still there's no help ? :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)