Super triple mega simple random skin changer

Started by Alecu Madalin, Oct 09, 2019, 05:32 PM

Previous topic - Next topic

Alecu Madalin

you got the idea i don't need to exmplain
cmd = cmd.tolower()
if (cmd == "skin") {
    player.Skin =  rand() % 300
    MessagePlayer( "[#FFFFFF]You're now a " + GetSkinName( player.Skin ), player );
    //MessagePlayer("You're a lizard harry XDD", player)
}

NicusorN5

If rand() % 300 equals a value like 199 you should know that the player skin will remain the default.

Alecu Madalin

Quote from: Athanatos on Oct 10, 2019, 03:40 PMIf rand() % 300 equals a value like 199 you should know that the player skin will remain the default.

yes i know that
maybe i will update
but nah it doesnt worth nothing

MatheuS

#3
Quote from: Alecu Madalin on Oct 10, 2019, 07:40 PM
Quote from: Athanatos on Oct 10, 2019, 03:40 PMIf rand() % 300 equals a value like 199 you should know that the player skin will remain the default.

yes i know that
maybe i will update
but nah it doesnt worth nothing

cmd = cmd.tolower()
if (cmd == "skin") {
    local random = rand() % 300;
    if( random > 199 ) player.Skin = 0;
    else player.Skin = random;
    MessagePlayer( "[#FFFFFF]You're now a " + GetSkinName( player.Skin ), player );
    //MessagePlayer("You're a lizard harry XDD", player)
}
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.