There is no legitimate cheat code for infinite money in GTA San Andreas on PS2. Any website claiming otherwise is misleading you—often to drive traffic or distribute malware.
Complete the game 100% first. The $500k reward + all assets generating income makes money irrelevant. The journey is the reward in San Andreas.