I see servers nowadays hosted by ip example[server.sa-mp.com:7777] so i wonder how
do they do it, can someone help?
You must own the address. For example: server.sa-mp.com, you must own the website. Then you have to create a subdomain and link it to the SA-MP Server. The server and the address must be hosted on the same IP.