03.09.2016, 20:31
Quote:
Код:
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player is not connected"); |
Quote:
Код:
stock IsPlayerMale(playerid){ if(!IsPlayerMale(playerid)) return true; return false;} |
Quote:
Код:
stock IsPlayerFemale(playerid){ if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player is not connected"); if(GetPlayerSkin(playerid) == 9) return true; else if(GetPlayerSkin(playerid) == 10) return true; else if(GetPlayerSkin(playerid) == 11) return true; else if(GetPlayerSkin(playerid) == 12) return true; else if(GetPlayerSkin(playerid) == 13) return true; else if(GetPlayerSkin(playerid) == 31) return true; else if(GetPlayerSkin(playerid) == 39) return true; else if(GetPlayerSkin(playerid) == 40) return true; else if(GetPlayerSkin(playerid) == 41) return true; else if(GetPlayerSkin(playerid) == 53) return true; else if(GetPlayerSkin(playerid) == 54) return true; else if(GetPlayerSkin(playerid) == 55) return true; else if(GetPlayerSkin(playerid) == 56) return true; else if(GetPlayerSkin(playerid) == 63) return true; else if(GetPlayerSkin(playerid) == 64) return true; else if(GetPlayerSkin(playerid) == 65) return true; else if(GetPlayerSkin(playerid) == 69) return true; else if(GetPlayerSkin(playerid) == 75) return true; else if(GetPlayerSkin(playerid) == 76) return true; else if(GetPlayerSkin(playerid) == 77) return true; else if(GetPlayerSkin(playerid) == 85) return true; else if(GetPlayerSkin(playerid) == 87) return true; else if(GetPlayerSkin(playerid) == 88) return true; else if(GetPlayerSkin(playerid) == 89) return true; else if(GetPlayerSkin(playerid) == 90) return true; else if(GetPlayerSkin(playerid) == 91) return true; else if(GetPlayerSkin(playerid) == 92) return true; else if(GetPlayerSkin(playerid) == 93) return true; else if(GetPlayerSkin(playerid) == 129) return true; else if(GetPlayerSkin(playerid) == 130) return true; else if(GetPlayerSkin(playerid) == 131) return true; else if(GetPlayerSkin(playerid) == 138) return true; else if(GetPlayerSkin(playerid) == 139) return true; else if(GetPlayerSkin(playerid) == 140) return true; else if(GetPlayerSkin(playerid) == 141) return true; else if(GetPlayerSkin(playerid) == 145) return true; else if(GetPlayerSkin(playerid) == 148) return true; else if(GetPlayerSkin(playerid) == 150) return true; else if(GetPlayerSkin(playerid) == 151) return true; else if(GetPlayerSkin(playerid) == 152) return true; else if(GetPlayerSkin(playerid) == 157) return true; else if(GetPlayerSkin(playerid) == 169) return true; else if(GetPlayerSkin(playerid) == 172) return true; else if(GetPlayerSkin(playerid) == 178) return true; else if(GetPlayerSkin(playerid) == 190) return true; else if(GetPlayerSkin(playerid) == 191) return true; else if(GetPlayerSkin(playerid) == 192) return true; else if(GetPlayerSkin(playerid) == 193) return true; else if(GetPlayerSkin(playerid) == 194) return true; else if(GetPlayerSkin(playerid) == 195) return true; else if(GetPlayerSkin(playerid) == 196) return true; else if(GetPlayerSkin(playerid) == 197) return true; else if(GetPlayerSkin(playerid) == 198) return true; else if(GetPlayerSkin(playerid) == 199) return true; else if(GetPlayerSkin(playerid) == 201) return true; else if(GetPlayerSkin(playerid) == 205) return true; else if(GetPlayerSkin(playerid) == 207) return true; else if(GetPlayerSkin(playerid) == 211) return true; else if(GetPlayerSkin(playerid) == 214) return true; else if(GetPlayerSkin(playerid) == 215) return true; else if(GetPlayerSkin(playerid) == 216) return true; else if(GetPlayerSkin(playerid) == 218) return true; else if(GetPlayerSkin(playerid) == 219) return true; else if(GetPlayerSkin(playerid) == 224) return true; else if(GetPlayerSkin(playerid) == 225) return true; else if(GetPlayerSkin(playerid) == 226) return true; else if(GetPlayerSkin(playerid) == 231) return true; else if(GetPlayerSkin(playerid) == 232) return true; else if(GetPlayerSkin(playerid) == 233) return true; else if(GetPlayerSkin(playerid) == 237) return true; else if(GetPlayerSkin(playerid) == 238) return true; else if(GetPlayerSkin(playerid) == 243) return true; else if(GetPlayerSkin(playerid) == 244) return true; else if(GetPlayerSkin(playerid) == 245) return true; else if(GetPlayerSkin(playerid) == 246) return true; else if(GetPlayerSkin(playerid) == 251) return true; else if(GetPlayerSkin(playerid) == 256) return true; else if(GetPlayerSkin(playerid) == 257) return true; else if(GetPlayerSkin(playerid) == 263) return true; else if(GetPlayerSkin(playerid) == 298) return true; else if(GetPlayerSkin(playerid) == 306) return true; else if(GetPlayerSkin(playerid) == 307) return true; else if(GetPlayerSkin(playerid) == 308) return true; else if(GetPlayerSkin(playerid) == 309) return true; return false;} |
Let's say the player's skin is 309, you'd be calling GetPlayerSkin 84 times.
That's a very bad thing to do.
https://sampwiki.blast.hk/wiki/Control_Structures#switch
Do that instead.