Help me please (Y_INI)
#1

Hey guys

I have the code:

PHP код:
#define APATH "/ATM/%i.ini" 
PHP код:
public OnPlayerEditObject(playeridplayerobjectobjectidresponseFloat:fXFloat:fYFloat:fZFloat:fRotXFloat:fRotYFloat:fRotZ)
{
    new 
Float:oldXFloat:oldYFloat:oldZFloat:oldRotXFloat:oldRotYFloat:oldRotZ;
    
    if(
response == EDIT_RESPONSE_FINAL)
    {
        new 
id;
        
GetObjectPos(objectidoldXoldYoldZ), GetObjectRot(objectidoldRotXoldRotYoldRotZ);
        
        for(new 
1MAX_ATM;h++)
        {
             
id h;
        break;
        }
        
       
AtmInfo[id][aPosX] = oldXAtmInfo[id][aPosY] = oldYAtmInfo[id][aPosZ] = oldZ;
       
AtmInfo[id][aPosRX] = oldRotXAtmInfo[id][aPosRY] = oldRotYAtmInfo[id][aPosRZ] = oldRotZ;
        
          new 
file4[40];
            
format(file4sizeof(file4), APATHid);
        new 
INI:File INI_Open(file4);
            
INI_SetTag(File,"data");
        
INI_WriteFloat(File,"PosX"AtmInfo[id][aPosX]);
        
INI_WriteFloat(File,"PosY"AtmInfo[id][aPosY]);
        
INI_WriteFloat(File,"PosZ"AtmInfo[id][aPosZ]);
        
INI_WriteFloat(File,"PosRX",AtmInfo[id][aPosRX]);
        
INI_WriteFloat(File,"PosRY",AtmInfo[id][aPosRY]);
        
INI_WriteFloat(File,"PosRZ",AtmInfo[id][aPosRZ]);
        
INI_Close(File);
        
CancelEdit(playerid);
    }

If the previous file name: 1, it should create a file named 2.
but this does not happen

First, it creates a file named, and with repeated use he writes in the first file.

Help me please...
Reply


Messages In This Thread
Help me please (Y_INI) - by JM_Millers - 02.07.2012, 19:05
Respuesta: Help me please (Y_INI) - by [DOG]irinel1996 - 02.07.2012, 19:07
Re: Help me please (Y_INI) - by JM_Millers - 02.07.2012, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)