So, i have to write a solo to a song, the key is F#.
We play heavy metal/progressiive metal. ANd i need some help. I am not so good on scales so i need some tips how to got forth trying to write this solo. and what scales are cool.

It really depends on the chord progression. If the bass/rhythm guitarist is just chugging on an f# for the whole solo, then consider using the chorus chord progression as way to figure out which scales to use and how your solo melody should progress.
The most common scales to use for Heavy Metal are the relative minor, the harmonic minor, and the minor pentatonic. The double harmonic minor, also known as the hungarian minor, is also a really nice scale to use. Mode wise, it depends on what feel you want - is the song cheerful, emotional, mechanical? My personal favourite mode is the locrian mode as it has a really dark sound. It's good to play around with different scales and modes in solos though, and also add in a few chromatic runs here and there.

Now for writing the solo, it once again depends on what sound you want. Do you want the solo to be melodic or is it going to be two minutes of shredding? Your solo doesn't have to be complex and fast, it just has to fit into the song. You might even consider just playing around with a vocal melody. In the end, all the solo is meant to do is put you, the lead guitarist, in the spotlight.

Dream Theater have fine examples of shred solos. Draconian and Season's End have good examples of melodic solos, and Queensryche mix melodic solos with shred solos quite often. I'd look into Progressive Metal guitarists and Neo-classical Metal guitarists and take a few pages from their book.

Hoope this helps.
tHATS the problem there, i dont know enough theory. so im finding this hard. The chords in the riff are in drop d power chords 4-2-0 4-7-0
it would be nice if you have 24 frets on your guitar for that key, ala Marty & Dave megadeth