I always want to become regular in namaz but everytime I think that other people don't pray but still they are succesful. Then for me to become successful why should I pray and stay away from many things

Prayer or otherwise is never related to matter of rizq or being successful or not. Prayer is an obligatory act of submission to Allah in order to gain close proximity to His divine acceptance and pardon. You pray not to be one successful in worldly standards, you pray to fulfill an obligation that is the means to your success in the hereafter. Rizq and success is strictly in Allah’s hand.