04.06.2014, 15:03
So I am making a gamemode for a server, and I am making it so that if you are a female Caucasian then you have to use a female Caucasian skin. The only problem is that it isn't actually working. I have looked over the code and I can find nothing wrong with it. Here is the code
Here is the dialog for the skin picking
Here is the stocks for checking if the skin is a white male/female
Also, those are all the skins for white males/females. If anyone needs them there they are feel free to use them (If they are correctly formatted so you can use them that is.)
Thank you for anyone who can and does help!
Here is the dialog for the skin picking
Код:
Dialog:Skin(playerid, response, listitem, inputtext[]) { if(response) { if(isnull(inputtext)) { ShowDialog(playerid, Show:<Skin>, DIALOG_STYLE_INPUT,"{08088A}Eastside Gaming Roleplay","Please pick the skin you wish to use.\nThis skin must be correct to your gender and race.","Accept","Quit"); } else if(strval(inputtext) > 299 || strval(inputtext) < 0) { ShowDialog(playerid, Show:<Skin>, DIALOG_STYLE_INPUT,"{08088A}Eastside Gaming Roleplay","Please pick the skin you wish to use.\nThis skin must be correct to your gender and race.\nPlease pick a skin between 0 - 299.","Accept","Quit"); } else if(strlen(inputtext) > 4) { ShowDialog(playerid, Show:<Skin>, DIALOG_STYLE_INPUT,"{08088A}Eastside Gaming Roleplay","Please pick the skin you wish to use.\nThis skin must be correct to your gender and race.\nThe skin should only be a three digit integer.","Accept","Quit"); } /*new string[25]; format(string,sizeof(string),"%i",inputtext); new skinid = strval(string);*/ //format(skinid,sizeof(skinid),"%i",inputtext); /*format(msg, sizeof(msg),"This is your skin: %i",strval(inputtext)); SCM(playerid, COLOR_RED, msg);*/ else if(strcmp(PlayerInfo[playerid][pSex],"Male",true,7)) { if(strcmp(PlayerInfo[playerid][pRace],"Caucasian",true,22)) { if(!SkinIsWhiteMale(strval(inputtext))) { GameTextForPlayer(playerid,"~r~The skin you have choosen is one that does not fit with your race/sex.",10000,3); ShowDialog(playerid, Show:<Skin>, DIALOG_STYLE_INPUT,"{08088A}Eastside Gaming Roleplay","Please pick the skin you wish to use.\nThis skin must be correct to your gender and race.\nPlease double check that the skin is the right Gender/Race","Register","Quit"); } else { PlayerInfo[playerid][pSkin] = strval(inputtext); BeginTutorial(playerid); } } } else if(strcmp(PlayerInfo[playerid][pSex],"Female",true,7)) { if(strcmp(PlayerInfo[playerid][pRace],"Caucasian",true,22)) { if(SkinIsWhiteFemale(strval(inputtext))) { PlayerInfo[playerid][pSkin] = strval(inputtext); { BeginTutorial(playerid); } } else { GameTextForPlayer(playerid,"~r~The skin you have choosen is one that does not fit with your race/sex.",10000,3); ShowDialog(playerid, Show:<Skin>, DIALOG_STYLE_INPUT,"{08088A}Eastside Gaming Roleplay","Please pick the skin you wish to use.\nThis skin must be correct to your gender and race.\nPlease double check that the skin is the right Gender/Race","Register","Quit"); } } } } else { Kick(playerid); } return 1; }
Код:
stock SkinIsWhiteMale(skinid) { if(skinid == 1 && skinid == 2 && skinid == 3 && skinid == 23 && skinid == 26 && skinid == 27 && skinid == 29 && skinid == 32 && skinid == 33 && skinid == 34 && skinid == 35) return true; else if(skinid == 37 && skinid == 42 && skinid == 45 && skinid == 52 && skinid == 53 && skinid == 59 && skinid == 60 && skinid == 61 && skinid == 62 && skinid == 68 && skinid == 68) return true; else if(skinid == 70 && skinid == 71 && skinid == 72 && skinid == 73 && skinid == 78 && skinid == 81 && skinid == 82 && skinid == 94 && skinid == 95 && skinid == 96 && skinid == 97) return true; else if(skinid == 98 && skinid == 99 && skinid == 100 && skinid == 101 && skinid == 111 && skinid == 112 && skinid == 113 && skinid == 119 && skinid == 124 && skinid == 125 && skinid == 126) return true; else if(skinid == 127 && skinid == 128 && skinid == 132 && skinid == 133 && skinid == 135 && skinid == 137 && skinid == 146 && skinid == 147 && skinid == 153 && skinid == 154 && skinid == 158) return true; else if(skinid == 159 && skinid == 160 && skinid == 161 && skinid == 162 && skinid == 164 && skinid == 165 && skinid == 167 && skinid == 171 && skinid == 177 && skinid == 179 && skinid == 181) return true; else if(skinid == 187 && skinid == 188 && skinid == 189 && skinid == 200 && skinid == 202 && skinid == 204 && skinid == 206 && skinid == 209 && skinid == 210 && skinid == 212 && skinid == 213) return true; else if(skinid == 217 && skinid == 230 && skinid == 234 && skinid == 234 && skinid == 235 && skinid == 236 && skinid == 239 && skinid == 240 && skinid == 241 && skinid == 242 && skinid == 247) return true; else if(skinid == 248 && skinid == 250 && skinid == 254 && skinid == 255 && skinid == 258 && skinid == 259 && skinid == 261 && skinid == 264 && skinid == 266 && skinid == 268 && skinid == 272) return true; else if(skinid == 276 && skinid == 277 && skinid == 279 && skinid == 280 && skinid == 281 && skinid == 282 && skinid == 283 && skinid == 285 && skinid == 286 && skinid == 287 && skinid == 288) return true; else if(skinid == 289 && skinid == 290 && skinid == 291 && skinid == 294 && skinid == 295 && skinid == 299) return true; else return false; } stock SkinIsWhiteFemale(skinid) { if(skinid == 39 && skinid == 53 && skinid == 55 && skinid == 75 && skinid == 77 && skinid == 85 && skinid == 87 && skinid == 88 && skinid == 89 && skinid == 90 && skinid == 91) return 0; if(skinid == 92 && skinid == 93 && skinid == 130 && skinid == 131 && skinid == 138 && skinid == 140 && skinid == 145 && skinid == 151 && skinid == 152 && skinid == 157 && skinid == 172) return 0; if(skinid == 178 && skinid == 192 && skinid == 193 && skinid == 194 && skinid == 196 && skinid == 197 && skinid == 198 && skinid == 199 && skinid == 201 && skinid == 211 && skinid == 214) return 0; if(skinid == 216 && skinid == 231 && skinid == 231 && skinid == 233 && skinid == 237 && skinid == 246 && skinid == 251 && skinid == 257) return 0; else return 1; }
Thank you for anyone who can and does help!