28.02.2015, 01:10
Hello so I load event cp with command and it set a cp to farm somewhere in LS but cordinates for x y z are fine written in ini file and of course I load those cordinates as float
this is the code for cps from loading command
this is the code for cps from loading command
pawn Код:
inline loadracedata(string:name[],string:value[])
{
new scps[128];
INI_Int("raceNumberCP",UtrkaInfo[raceNumberCP]);
for(new cpsrc = 0; cpsrc < UtrkaInfo[raceNumberCP]; cpsrc++)
{
format(scps,sizeof(scps),"CPPosX%d",cpsrc);
INI_Float(scps,CPInfo[cpsrc][cpX]);
format(scps,sizeof(scps),"CPPosY%d",cpsrc);
INI_Float(scps,CPInfo[cpsrc][cpY]);
format(scps,sizeof(scps),"CPPosZ%d",cpsrc);
INI_Float(scps,CPInfo[cpsrc][cpZ]);[cpZ]);
}
}
new file[128]; format(file,128,"races/%s.ini",racename);
INI_ParseFile(file,"loadracedata");