Random Skin Problem
#1

when a player registers on my server script it should set the player skin to a random id from
pawn Код:
new SkinArray[] = {
    3, 4, 5, 6, 7, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273,       1,2,7,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,
    38,40,43,44,45,46,47,48,49,50,51,52,57,58,59,60,61,62,66,67,68,70,71,72,73,78,
    79,80,81,82,83,84,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,
    113,114,115,116,117,118,120,121,122,123,124,125,126,127,128,131,132,133,134,135,
    136,137,142,143,144,146,147,153,154,155,156,158,159,160,161,162,163,164,165,166,
    167,168,170,171,173,174,175,176,177,179,180,181,182,183,184,185,186,187,188,189,
    200,202,203,204,206,209,210,212,213,217,220,221,222,223,227,228,229,230,234,235,
    236,239,240,241,242,247,248,249,250,252,253,254,255,258,259,260,261,262,264,265,
    266,267,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,285,286,287,
    288,289,290,291,292,293,294,295,296,297,299,
    9,10,11,12,13,31,39,41,42,53,54,55,56,63,64,69,75,76,77,85,87,88,89,90,91,92,93,
    109,111,129,130,131,138,139,140,141,145,148,150,151,152,157,169,172,178,190,191,
    192,193,194,195,196,197,198,199,201,205,207,211,214,215,216,218,219,224,225,226,
    231,232,233,237,238,243,244,245,246,251,256,257,263,298
};
but its setting it to the default skin CJ witch it not in that list

this is what sets it on register

pawn Код:
new randMSG = random(sizeof(SkinArray));
                SetSpawnInfo(playerid, 0, SkinArray[randMSG], 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
Reply
#2

Where are you calling it?

Worked fine for me.
Reply
#3

pawn Код:
new SkinArray[3, 4, 5, 6, 7, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273,       1,2,7,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,
    38,40,43,44,45,46,47,48,49,50,51,52,57,58,59,60,61,62,66,67,68,70,71,72,73,78,
    79,80,81,82,83,84,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,
    113,114,115,116,117,118,120,121,122,123,124,125,126,127,128,131,132,133,134,135,
    136,137,142,143,144,146,147,153,154,155,156,158,159,160,161,162,163,164,165,166,
    167,168,170,171,173,174,175,176,177,179,180,181,182,183,184,185,186,187,188,189,
    200,202,203,204,206,209,210,212,213,217,220,221,222,223,227,228,229,230,234,235,
    236,239,240,241,242,247,248,249,250,252,253,254,255,258,259,260,261,262,264,265,
    266,267,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,285,286,287,
    288,289,290,291,292,293,294,295,296,297,299,
    9,10,11,12,13,31,39,41,42,53,54,55,56,63,64,69,75,76,77,85,87,88,89,90,91,92,93,
    109,111,129,130,131,138,139,140,141,145,148,150,151,152,157,169,172,178,190,191,
    192,193,194,195,196,197,198,199,201,205,207,211,214,215,216,218,219,224,225,226,
    231,232,233,237,238,243,244,245,246,251,256,257,263,298];
This is same like in my script it will work I think
Reply
#4

Quote:
Originally Posted by Sanady
Посмотреть сообщение
pawn Код:
new SkinArray[3, 4, 5, 6, 7, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273,       1,2,7,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,
    38,40,43,44,45,46,47,48,49,50,51,52,57,58,59,60,61,62,66,67,68,70,71,72,73,78,
    79,80,81,82,83,84,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,
    113,114,115,116,117,118,120,121,122,123,124,125,126,127,128,131,132,133,134,135,
    136,137,142,143,144,146,147,153,154,155,156,158,159,160,161,162,163,164,165,166,
    167,168,170,171,173,174,175,176,177,179,180,181,182,183,184,185,186,187,188,189,
    200,202,203,204,206,209,210,212,213,217,220,221,222,223,227,228,229,230,234,235,
    236,239,240,241,242,247,248,249,250,252,253,254,255,258,259,260,261,262,264,265,
    266,267,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,285,286,287,
    288,289,290,291,292,293,294,295,296,297,299,
    9,10,11,12,13,31,39,41,42,53,54,55,56,63,64,69,75,76,77,85,87,88,89,90,91,92,93,
    109,111,129,130,131,138,139,140,141,145,148,150,151,152,157,169,172,178,190,191,
    192,193,194,195,196,197,198,199,201,205,207,211,214,215,216,218,219,224,225,226,
    231,232,233,237,238,243,244,245,246,251,256,257,263,298];
This is same like in my script it will work I think
Did you even try it, it will NOT WORK in any condition
Reply
#5

yes i did try it and it did'nt save but ill try again
Reply
#6

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
Where are you calling it?

Worked fine for me.
im calling this on dialog response on registration
Reply
#7

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
Did you even try it, it will NOT WORK in any condition
Ups my wrong...I didn`t saw wrong one never mind
Reply
#8

new skin = random( 300 );

random skin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)