[Pedido] converte
#1

alguem passa isso aki pra dof2

Код HTML:
CMD:criarcasa(playerid, params[])
{
    new interior,preco;
    if(sscanf(params,"dd", interior, preco)) return SendClientMessage(playerid,-1,"Use: /criarcasa [Int] [Preco]");
    new Float:Pos[3];
    GetPlayerPos(playerid, Pos[0],Pos[1], Pos[2]);
    new file[56],IDCasa;
    if(!INI_Exist("IDCasas.ini"))
    {
        if(INI_Open("IDCasas.ini"))
        {
            INI_WriteInt("ID",nCasas);
            INI_Save();
            INI_Close();
        }
    }
    if(INI_Open("IDCasas.ini"))
    {
        IDCasa = INI_ReadInt("ID");
        format(file,sizeof(file),"Casas/%d.ini", IDCasa);
        INI_Close();
    }
    if(INI_Open(file))
    {
        INI_WriteInt("Int", interior);
        INI_WriteInt("Preco", preco);
        INI_WriteFloat("PosX", Pos[0]);
        INI_WriteFloat("PosY", Pos[1]);
        INI_WriteFloat("PosZ", Pos[2]);
        pickupcasa[IDCasa] = CreatePickup(1273, 1, Pos[0],Pos[1],Pos[2], 0);
        format(Text3D[IDCasa], 60,"Casa a venda\nPreзo: %d", preco);
        Create3DTextLabel(Text3D[IDCasa],-1,Pos[0],Pos[1],Pos[2], 6,0,0);
        INI_Save();
        INI_Close();
        nCasas ++;
        if(INI_Open("IDCasas.ini"))
        {
            INI_WriteInt("ID", nCasas);
            INI_Save();
            INI_Close();
        }
    }
    return 1;
}
Reply


Messages In This Thread
converte - by WarniinG - 06.03.2013, 15:12
Re: converte - by WarniinG - 13.03.2013, 18:17
Re: converte - by Kuddy - 13.03.2013, 18:29
Re: converte - by WarniinG - 13.03.2013, 18:47
Re: converte - by WarniinG - 13.03.2013, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)