23.12.2014, 15:49 
	(
 Последний раз редактировалось TheSnaKe; 23.12.2014 в 20:19.
)
	
	
		Hello there, when am destroying the ATM and restarting the server, the object won't be deleted why? I guess it won't save so that's why it won't be deleted. How can i fix that.
The command:
	
	
	
	
PHP код:
    }
    if(dialogid == 52)
    {
        if(response)
        {
            new tmpid = IsPlayerAtATM(playerid);
            if(tmpid!=-1)
            {
                new path[32];
                format(path,sizeof(path),"atm%d.txt",tmpid);
                dini_Remove(path);
                Delete3DTextLabel(atmInfo[tmpid][aText]);
                DestroyDynamicObject(atmInfo[tmpid][aObject]);
                atmInfo[tmpid][aX]=0.0;
                atmInfo[tmpid][aY]=0.0;
                atmInfo[tmpid][aZ]=0.0;
                atmInfo[tmpid][aA]=0.0;
                //SendClientMessage(playerid, COLOR_GREY,"ATM ID: %d destroyed successfully",tmpid);
                new string[128];
                format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s has destroyed an ATM", RPN(playerid));
                SendAdminMessage(COLOR_DARKRED, 1, string);
                return 1;
            } else return 0;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY,"Destroying ATM canceled");
            return 1;
        }
    }
    if(dialogid == 51)
    {
        if(response)
        {
            new Float:Pos[4];
            GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
            GetPlayerFacingAngle(playerid,Pos[3]);
            //new atmid = CreateATM(Pos[0],Pos[1],Pos[2],Pos[3]);
            CreateATM(Pos[0],Pos[1],Pos[2],Pos[3]);
            //SendClientMessage(playerid, COLOR_GREY,"ATM ID: %d successfully created", atmid);
            new string[128];
               format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s has created an ATM", RPN(playerid));
            SendAdminMessage(COLOR_DARKRED, 1, string);
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY,"Creating ATM canceled");
            return 1;
        } 
PHP код:
}
CMD:deleteatm(playerid, params[])
{
        if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
        if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
        {
        new tmpid = IsPlayerAtATM(playerid);
        if(tmpid!=-1)
        {
            new stringa[MAX_STRING];
            format(stringa,sizeof(stringa),"Are you sure you want to destroy ATM ID: %d",tmpid);
            ShowPlayerDialog(playerid,52,DIALOG_STYLE_MSGBOX,"ATM destroy",stringa,"Yes","No");
            return 1;
        } else return SendClientMessage(playerid, COLOR_GREY,"You are not at ATM");
    }
} 




