[HELP]: How these codes can be load to ongamemodeinit ? - 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: [HELP]: How these codes can be load to ongamemodeinit ? (
/showthread.php?tid=365143)
[HELP]: How these codes can be load to ongamemodeinit ? -
razol - 02.08.2012
Solved.
AW: [HELP]: How these codes can be load to ongamemodeinit ? -
razol - 02.08.2012
Is there any help please ?
Re: [HELP]: How these codes can be load to ongamemodeinit ? -
[KHK]Khalid - 02.08.2012
https://sampwiki.blast.hk/wiki/File_Functions scroll down and you will find a quick-tutorial about reading from a file.
AW: [HELP]: How these codes can be load to ongamemodeinit ? -
razol - 02.08.2012
I already did look this tutorial but i couldn't.Please help me !
Re: [HELP]: How these codes can be load to ongamemodeinit ? -
[MM]RoXoR[FS] - 02.08.2012
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);
}
}
}
}
AW: [HELP]: How these codes can be load to ongamemodeinit ? -
razol - 02.08.2012
I'm using i/o.Still it doesn't work.
AW: [HELP]: How these codes can be load to ongamemodeinit ? -
razol - 02.08.2012
Still there's no help ? :S