Вход

Просмотр полной версии : [Вопрос] Оптимизация кода



ALIT13
20.01.2016, 20:00
Как можно упростить код этот

if(clickedid == SkinRabLeft)
{
switch (SelectCharID[playerid])
{
case 1: // LSPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 2: // FBI
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[8][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[9][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[10][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[11][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[12][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[13][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 3: // Army SF
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[91][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[89][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 179); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 4: // Medics SF
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[16][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[17][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[18][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[19][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[20][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 5: // La Cosa Nostra
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[21][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[22][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[23][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[24][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 290); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 119); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 6: // Yakuza
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[25][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[26][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[27][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[28][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 121); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 7: // Goverment
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[29][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[30][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[31][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[32][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[33][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 8: // Casino Caligula
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 189); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[46][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[47][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 10: // SFPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[34][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[35][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[36][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[37][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[38][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[39][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[40][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[41][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 11: // Instructors
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[48][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[49][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[51][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 171); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 194); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 12: // Ballas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[74][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[75][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[76][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 13: // Vagos
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[80][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[81][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[82][0]); SelectCharPlace[playerid] = 2;SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 226); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 14: // Russian Mafia
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[60][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[61][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[62][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[63][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[64][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 3); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 15: // Grove
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[65][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[66][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[67][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[68][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[69][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[70][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 56); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 16: // SA News
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[85][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[86][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[87][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[88][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 17: // Aztek
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[71][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[72][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[73][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 226); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 292); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 18: // Rifa
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[77][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[78][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[79][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 226); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 273); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 19: // Army LV
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[91][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[89][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 179); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 21: // LVPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[52][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[53][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[54][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[55][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[56][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[57][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[58][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[59][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 22: // Хитманы
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 181); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
}
}
//--------------------------------------------------------------------------
if(clickedid == SkinRabSelect)
{
PlayerInfo[playerid][pSkin] = GetPVarInt(playerid,"InviteSkin");
//forma[playerid] = 0;
SetPlayerVirtualWorld(playerid,0);
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
TogglePlayerControllable(playerid,1);
CancelSelectTextDraw(playerid);
SpawnPlayer(playerid);
TextDrawHideForPlayer(playerid,SkinRabSelect);
TextDrawHideForPlayer(playerid,SkinRabRight);
TextDrawHideForPlayer(playerid,SkinRabLeft);
TextDrawHideForPlayer(playerid,SkinRabCancel);
}
//--------------------------------------------------------------------------
if(clickedid == SkinRabRight)
{
switch (SelectCharID[playerid])
{
case 1: // LSPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 2: // FBI
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[8][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[9][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[10][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[11][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[12][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[13][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 3: // Army SF
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[91][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[89][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 179); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 4: // Medics SF
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[16][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[17][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[18][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[19][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[20][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 5: // La Cosa Nostra
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[21][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[22][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[23][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[24][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 290); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 119); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 6: // Yakuza
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[25][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[26][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[27][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[28][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 121); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 7: // Goverment
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[29][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[30][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[31][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[32][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[33][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 8: // Casino Caligula
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 189); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[46][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[47][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 10: // SFPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[34][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[35][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[36][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[37][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[38][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[39][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[40][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[41][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 11: // Instructors
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[48][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[49][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[51][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 171); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 194); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 12: // Ballas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[74][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[75][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[76][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 13: // Vagos
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[80][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[81][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[82][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 226); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 14: // Russian Mafia
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[60][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[61][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[62][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[63][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[64][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 3); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 15: // Grove
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[65][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[66][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[67][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[68][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[69][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[70][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 56); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 16: // SA News
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[85][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[86][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[87][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[88][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 17: // Aztek
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[71][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[72][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[73][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 226); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 292); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 18: // Rifa
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[77][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[78][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[79][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 226); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 273); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 19: // Army LV
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[91][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[89][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 179); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 21: // LVPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[52][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[53][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[54][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[55][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[56][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[57][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[58][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[59][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
case 22: // Хитманы
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 181); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
}
}
}

BadPawn
20.01.2016, 20:10
вместо if esle, запустить очередной switch

- - - Добавлено - - -


if(clickedid == SkinRabLeft)
{
switch (SelectCharID[playerid])
{
case 1: // LSPD
{
switch(SelectCharPlace[playerid])
{
case 1: SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 2: SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 3: SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 4: SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 5: SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 6: SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 7: SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
case 8: SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
}
так

Fantom
20.01.2016, 21:21
вместо if esle, запустить очередной switch

И где тут оптимизация?

Роуди.
20.01.2016, 21:24
Сколько от Вас однотипных тем за погоней миллисекунд, госпадя..

BadPawn
20.01.2016, 21:24
И где тут оптимизация?

Есть варианты получше? Так вот, вместо того, что бы следить за мной, лучше бы подсказал парню, как лучше сделать, а не умничать по беспонтовой. Сказал сколько знаю, знаешь больше, предлагай.

Fantom
20.01.2016, 21:43
Есть варианты получше? Так вот, вместо того, что бы следить за мной, лучше бы подсказал парню, как лучше сделать, а не умничать по беспонтовой. Сказал сколько знаю, знаешь больше, предлагай.

Дак это даже не вариант у Вас получилось. Это как сказать вместо слово "Да", слово "Yes". Пишется по разному, но смысл один и тот же. Твой "вариант" это скорее всего "упрощение" строк, но увы, это никак не влияет на производительность.

Daniel_Cortez
20.01.2016, 21:46
Твой "вариант" это скорее всего "упрощение" строк, но увы, это никак не влияет на производительность.
Пруфы?

vovandolg
20.01.2016, 21:52
GetPlayerSkin(playerid) залепить в одну переменную + вариант с case как выше.
_____________

Дак это даже не вариант у Вас получилось. Это как сказать вместо слово "Да", слово "Yes". Пишется по разному, но смысл один и тот же. Твой "вариант" это скорее всего "упрощение" строк, но увы, это никак не влияет на производительность.
В какой то теме я видел что если значений много то лучше использовать вариант со switch, так как там была разница в цифрах, switch работает быстрее варианта if,else if в некоторых вариантах, но только если их много, а для двух трёх значений вполне хватит if, else if.

ziggi
20.01.2016, 22:20
Честно говоря, я в ужасе. О чём вы вообще думаете, когда пишете подобный код? Главной задачей любого компьютера является помощь человеку в выполнении рутинных действий. А вы все рутинные действия взяли на себя, тогда какой, по вашему, смысл в программировании?


if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }


Эти 40 (после нормального форматирования) ужасных строчек кода, можно записать вот так просто:


if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}

new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];

SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);


Остальное пишите сами, может чему-нибудь научитесь.

vovandolg
20.01.2016, 23:11
А если SelectCharPlace[playerid] перевести в PVar будет быстрее или так же?

Fantom
20.01.2016, 23:14
Пруфы?

Вот и возьмите эту тему в "Мифы о pawn-скриптинге" xD

ziggi
20.01.2016, 23:27
А если SelectCharPlace[playerid] перевести в PVar будет быстрее или так же?

Будет медленнее, но лучше используйте то, что вам удобнее. Не нужно гнаться за подобной "оптимизацией".

Daniel_Cortez
21.01.2016, 08:52
Вот и возьмите эту тему в "Мифы о pawn-скриптинге" xD
Поздравляю, своей попыткой перевести стрелки вы только что признали, что вы пустослов и к вашему "экспертному мнению" не следует прислушиваться.



А если SelectCharPlace[playerid] перевести в PVar будет быстрее или так же?
Медленнее, но оптимизация будет иметь смысл только при написании наиболее критичного ко времени выполнения кода (например, в OnPlayerUpdate, в таймерах с перебором всех игроков или в командах).

ALIT13
21.01.2016, 12:13
Честно говоря, я в ужасе. О чём вы вообще думаете, когда пишете подобный код? Главной задачей любого компьютера является помощь человеку в выполнении рутинных действий. А вы все рутинные действия взяли на себя, тогда какой, по вашему, смысл в программировании?


if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 8; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 1; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 2; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 3; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 4; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 5; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 6; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 7; SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }


Эти 40 (после нормального форматирования) ужасных строчек кода, можно записать вот так просто:


if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}

new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];

SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);


Остальное пишите сами, может чему-нибудь научитесь.

Спасибо , можешь расписать что за что отвечает


if (SelectCharPlace[playerid] == 1) { // Ну эт я понял скок всего скинов от 1 до 8
SelectCharPlace[playerid] = 8; // Ну эт я понял скок всего скинов от 1 до 8
} else {
SelectCharPlace[playerid]--; // За что отвечает ?
}

new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0]; // За что отвечает ?

SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);

seriu
21.01.2016, 13:20
Для начала нужно сделать по очереди скины в JoinPed по фракциям
к примеру:

static const JoinPed[][] = {
{скин лспд м,скин лспд ж},//0
{скин лспд м,скин лспд ж},//1
{скин лспд м,скин лспд ж},//2
{скин лспд м,скин лспд ж},//3
{скин лспд м,скин лспд ж},//4
{скин лспд м,скин лспд ж},//5
{скин лспд м,скин лспд ж},//6
{скин лспд м,скин лспд ж},//7
{скин fbi м,скин fbi ж}, //8
{скин fbi м,скин fbi ж}, //9
{скин fbi м,скин fbi ж}, //10
{скин fbi м,скин fbi ж}, //11
{скин fbi м,скин fbi ж}, //12
{скин fbi м,скин fbi ж}, //13
{скин Army SF м,скин Army SF ж}, //14
{скин Army SF м,скин Army SF ж}, //15
{скин Army SF м,скин Army SF ж}, //16
{скин Medics SF м,скин Medics SF ж}, //16
.....
};
По скольку женских скинов мало, то чередуй их или если 1 то ставь везде 1


Да кстати если мне не кажется то JoinPed[SelectCharPlace[playerid]][0] 0 отвечат за М / Ж .. т.е можешь сделать так что бы переменная пола М равнялась 0, а переменная пола Ж равнялась 1
Пример


new bool:Player_Sex[MAX_PLAYERS];

Player_Sex[playerid] = true; // женщина
Player_Sex[playerid] = false; // мужик


if(clickedid == SkinRabLeft) // <<
{
SelectCharPlace[playerid]--;
switch (SelectCharID[playerid])
{
case 1:if (SelectCharPlace[playerid] < 0) SelectCharPlace[playerid] = 7; // LSPD 0 начало скинов 7 конец
case 2:if (SelectCharPlace[playerid] < 8) SelectCharPlace[playerid] = 13; // FBI 8 начало скинов фбр // 13 конец
case 3:if (SelectCharPlace[playerid] < 14) SelectCharPlace[playerid] = 16; // ARMY SF 14 начало скинов армии // 16 конец
}
SetPlayerSkin(playerid, JoinPed[SelectCharPlace[playerid]][Player_Sex[playerid]]);
SetPVarInt(playerid,"InviteSkin",JoinPed[SelectCharPlace[playerid]][Player_Sex[playerid]]);
}


if(clickedid == SkinRabRight) // >>
{
SelectCharPlace[playerid]++;
switch (SelectCharID[playerid])
{
case 1:if (SelectCharPlace[playerid] > 7) SelectCharPlace[playerid] = 0; // LSPD 0 начало скинов 7 конец
case 2:if (SelectCharPlace[playerid] > 13) SelectCharPlace[playerid] = 8; // FBI 8 начало скинов фбр // 13 конец
case 3:if (SelectCharPlace[playerid] > 16) SelectCharPlace[playerid] = 14; // ARMY SF 14 начало скинов армии // 16 конец
}
SetPlayerSkin(playerid, JoinPed[SelectCharPlace[playerid]][Player_Sex[playerid]]);
SetPVarInt(playerid,"InviteSkin",JoinPed[SelectCharPlace[playerid]][Player_Sex[playerid]]);
}

Примерно так, думаю понятно объяснил далее сможешь сам.

ALIT13
21.01.2016, 13:43
Вот по 1 способу как напсиали сделал и у меня получается везде скины токо 1 фраки lspd

case 1: // LSPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 2: // FBI
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}

ziggi
21.01.2016, 13:52
Вот по 1 способу как напсиали сделал и у меня получается везде скины токо 1 фраки lspd

case 1: // LSPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 2: // FBI
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}

А что ты хотел? Ты просто скопировал код.

ALIT13
21.01.2016, 14:01
А что ты хотел? Ты просто скопировал код.

я всё переделал по твоему коду и изменил кол скинов

if(clickedid == SkinRabLeft)
{
switch (SelectCharID[playerid])
{
case 1: // LSPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 2: // FBI
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 3: // Army SF
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 3;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 4: // Medics SF
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 5: // La Cosa Nostra
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 6: // Yakuza
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 7: // Goverment
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 8: // Casino Caligula
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 3;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 10: // SFPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 11: // Instructors
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 12: // Ballas
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 13: // Vagos
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 14: // Russian Mafia
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 15: // Grove
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 16: // SA News
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 17: // Aztek
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 18: // Rifa
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 19: // Army LV
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 3;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 21: // LVPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 22: // Õèòìàíû
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
}
}
а скины все 1

seriu
21.01.2016, 14:07
я всё переделал по твоему коду и изменил кол скинов

if(clickedid == SkinRabLeft)
{
switch (SelectCharID[playerid])
{
case 1: // LSPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 2: // FBI
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 3: // Army SF
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 3;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 4: // Medics SF
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 5: // La Cosa Nostra
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 6: // Yakuza
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 7: // Goverment
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 8: // Casino Caligula
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 3;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 10: // SFPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 11: // Instructors
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 12: // Ballas
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 13: // Vagos
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 14: // Russian Mafia
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 15: // Grove
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 16: // SA News
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 17: // Aztek
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 5;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 18: // Rifa
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 6;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 19: // Army LV
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 3;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 21: // LVPD
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
case 22: // Õèòìàíû
{
if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 4;
} else {
SelectCharPlace[playerid]--;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}
}
}
а скины все 1

Зачем ты пытаешься делать по методу ziggi если у тебя скины в JoinPed в разброс стоят, естественно ничего не выйдет
да и к тому же, что ты сделал?

if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}

У тебя при первой проверки SekectCharPlace будет равняться 8 и все ничего более делаться не будет.

Не ленись перепиши JoinPed по порядку по фракциям и будет тебе оптимизация на уровне.

Не знаешь где узнать скин ид для проверки?
https://wiki.sa-mp.com/wiki/Skins:All

#EDIT#
либо создай новую переменную для скинов фракции

static const JoinFped[][] = {...
};
и делай по моему примеру

ALIT13
21.01.2016, 17:00
Зачем ты пытаешься делать по методу ziggi если у тебя скины в JoinPed в разброс стоят, естественно ничего не выйдет
да и к тому же, что ты сделал?

if (SelectCharPlace[playerid] == 1) {
SelectCharPlace[playerid] = 8;
} else {
SelectCharPlace[playerid]--;
}

У тебя при первой проверки SekectCharPlace будет равняться 8 и все ничего более делаться не будет.

Не ленись перепиши JoinPed по порядку по фракциям и будет тебе оптимизация на уровне.

Не знаешь где узнать скин ид для проверки?
https://wiki.sa-mp.com/wiki/Skins:All

#EDIT#
либо создай новую переменную для скинов фракции

static const JoinFped[][] = {...
};
и делай по моему примеру

Сделал по образцу фракций 6 идёт всё правильно потом скины берутся из -1 назад примеру мент , потом баллас , баллас 1 скин потом менты идут

if(clickedid == SkinRabLeft)
{
SelectCharPlace[playerid]--;
switch (SelectCharID[playerid])
{
case 1:if (SelectCharPlace[playerid] < 1) SelectCharPlace[playerid] = 8;
case 2:if (SelectCharPlace[playerid] < 9) SelectCharPlace[playerid] = 14;
case 3:if (SelectCharPlace[playerid] < 15) SelectCharPlace[playerid] = 16;
case 4:if (SelectCharPlace[playerid] < 17) SelectCharPlace[playerid] = 21;
case 5:if (SelectCharPlace[playerid] < 22) SelectCharPlace[playerid] = 25;
case 6:if (SelectCharPlace[playerid] < 26) SelectCharPlace[playerid] = 29;
case 7:if (SelectCharPlace[playerid] < 30) SelectCharPlace[playerid] = 34;
case 8:if (SelectCharPlace[playerid] < 35) SelectCharPlace[playerid] = 42;
case 9:if (SelectCharPlace[playerid] < 43) SelectCharPlace[playerid] = 46;
case 10:if (SelectCharPlace[playerid] < 47) SelectCharPlace[playerid] = 48;
case 11:if (SelectCharPlace[playerid] < 49) SelectCharPlace[playerid] = 52;
case 12:if (SelectCharPlace[playerid] < 53) SelectCharPlace[playerid] = 60;
case 13:if (SelectCharPlace[playerid] < 61) SelectCharPlace[playerid] = 65;
case 14:if (SelectCharPlace[playerid] < 66) SelectCharPlace[playerid] = 71;
case 15:if (SelectCharPlace[playerid] < 72) SelectCharPlace[playerid] = 74;
case 16:if (SelectCharPlace[playerid] < 75) SelectCharPlace[playerid] = 77;
case 17:if (SelectCharPlace[playerid] < 78) SelectCharPlace[playerid] = 80;
case 18:if (SelectCharPlace[playerid] < 81) SelectCharPlace[playerid] = 82;
case 19:if (SelectCharPlace[playerid] < 83) SelectCharPlace[playerid] = 84;
case 20:if (SelectCharPlace[playerid] < 85) SelectCharPlace[playerid] = 88;
case 21:if (SelectCharPlace[playerid] < 89) SelectCharPlace[playerid] = 104;
case 22:if (SelectCharPlace[playerid] < 105) SelectCharPlace[playerid] = 109;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}


static const JoinPed[110][1] =
{
{280},//LSPD1
{281},//LSPD2
{282},//LSPD3
{283},//LSPD4
{284},//LSPD5
{285},//LSPD6
{288},//LSPD7
{76},//LSPD8
//============
{286},//FBI1
{163},//FBI2
{164},//FBI3
{165},//FBI4
{166},//FBI5
{141},//FBI6
//============
{287},//ArmySF1
{191},//ArmySF2
//============
{70},//Mediks1
{274},//Mediks2
{275},//Mediks3
{276},//Mediks4
{219},//Mediks5
//============
{223},//LCN1
{124},//LCN2
{113},//LCN3
{214},//LCN4
//============
{120},//YAKUZA1
{123},//YAKUZA3
{169},//YAKUZA2
{186},//YAKUZA4
//============
{57},//Goverment1
{150},//Goverment2
{98},//Goverment3
{187},//Goverment4
{147},//Goverment5
//============
{280},//SFPD1
{281},//SFPD2
{282},//SFPD3
{283},//SFPD4
{284},//SFPD5
{285},//SFPD6
{288},//SFPD7
{76},//SFPD8
//===========
{250},//SFNEWS1
{261},//SFNEWS2
{211},//SFNEWS3
{217},//SFNEWS4
//===========
{171},//Casino1
{11},//Casino2
//===========
{59},//Instructors1
{172},//Instructors2
{189},//Instructors3
{240},//Instructors4
//==========
{280},//LVPD1
{281},//LVPD2
{282},//LVPD3
{283},//LVPD4
{284},//LVPD5
{285},//LVPD6
{288},//LVPD7
{76},//LVPD8
//==========
{112},//RussianMafia1
{111},//RussianMafia2
{125},//RussianMafia4
{272},//RussianMafia3
{214},//RussianMafia5
//==========
{105},//GROOVE1
{106},//GROOVE2
{107},//GROOVE3
{269},//GROOVE4
{270},//GROOVE5
{271},//GROOVE6
//==========
{114},//Aztecas1
{115},//Aztecas2
{116},//Aztecas3
//==========
{102},//BALLAS1
{103},//BALLAS2
{104},//BALLAS3
//==========
{173},//RIFA1
{174},//RIFA2
{175},//RIFA3
//==========
{108},//VAGOS1
{109},//VAGOS2
{110},//VAGOS3
//==========
{287},//ArmyLV1
{191},//ArmyLV2
//==========
{250},//LSNEWS1
{261},//LSNEWS2
{211},//LSNEWS3
{217},//LSNEWS4
//==========
{287},//PED1
{287},//PED2
{191},//PED3
{287},//PED4
{287},//PED5
{191},//PED6
{287},//PED7
{200},//PED8
{230},//PED9
{137},//PED10
{212},//PED11
{79},//PED12
{78},//PED13
{96},//PED14
{90},//PED15
{55},//PED16
//==========
{247},//Bikers1
{248},//Bikers2
{254},//Bikers3
{298},//Bikers4
{201}//Bikers5
};

vovandolg
21.01.2016, 18:38
Сделай массивов со скинами столько, сколько у тебя фрак и на каждую используй свой массив..
Тебе же ziggi написал вот тебе кусочек кода, а дальше сам пиши под себя..

ALIT13
21.01.2016, 18:43
Сделай массивов со скинами столько, сколько у тебя фрак и на каждую используй свой массив..
Тебе же ziggi написал вот тебе кусочек кода, а дальше сам пиши под себя..

и что мне теперь 22 создовать
new ment[]
new ballas[] и на каждый так

seriu
21.01.2016, 18:57
Сделал по образцу фракций 6 идёт всё правильно потом скины берутся из -1 назад примеру мент , потом баллас , баллас 1 скин потом менты идут

if(clickedid == SkinRabLeft)
{
SelectCharPlace[playerid]--;
switch (SelectCharID[playerid])
{
case 1:if (SelectCharPlace[playerid] < 1) SelectCharPlace[playerid] = 8;
case 2:if (SelectCharPlace[playerid] < 9) SelectCharPlace[playerid] = 14;
case 3:if (SelectCharPlace[playerid] < 15) SelectCharPlace[playerid] = 16;
case 4:if (SelectCharPlace[playerid] < 17) SelectCharPlace[playerid] = 21;
case 5:if (SelectCharPlace[playerid] < 22) SelectCharPlace[playerid] = 25;
case 6:if (SelectCharPlace[playerid] < 26) SelectCharPlace[playerid] = 29;
case 7:if (SelectCharPlace[playerid] < 30) SelectCharPlace[playerid] = 34;
case 8:if (SelectCharPlace[playerid] < 35) SelectCharPlace[playerid] = 42;
case 9:if (SelectCharPlace[playerid] < 43) SelectCharPlace[playerid] = 46;
case 10:if (SelectCharPlace[playerid] < 47) SelectCharPlace[playerid] = 48;
case 11:if (SelectCharPlace[playerid] < 49) SelectCharPlace[playerid] = 52;
case 12:if (SelectCharPlace[playerid] < 53) SelectCharPlace[playerid] = 60;
case 13:if (SelectCharPlace[playerid] < 61) SelectCharPlace[playerid] = 65;
case 14:if (SelectCharPlace[playerid] < 66) SelectCharPlace[playerid] = 71;
case 15:if (SelectCharPlace[playerid] < 72) SelectCharPlace[playerid] = 74;
case 16:if (SelectCharPlace[playerid] < 75) SelectCharPlace[playerid] = 77;
case 17:if (SelectCharPlace[playerid] < 78) SelectCharPlace[playerid] = 80;
case 18:if (SelectCharPlace[playerid] < 81) SelectCharPlace[playerid] = 82;
case 19:if (SelectCharPlace[playerid] < 83) SelectCharPlace[playerid] = 84;
case 20:if (SelectCharPlace[playerid] < 85) SelectCharPlace[playerid] = 88;
case 21:if (SelectCharPlace[playerid] < 89) SelectCharPlace[playerid] = 104;
case 22:if (SelectCharPlace[playerid] < 105) SelectCharPlace[playerid] = 109;
}
new skinid = JoinPed[ SelectCharPlace[playerid] - 1 ][0];
SetPlayerSkin(playerid, skinid);
SetPVarInt(playerid,"InviteSkin", skinid);
}


static const JoinPed[110] =
{
{280},//LSPD1
{281},//LSPD2
{282},//LSPD3
{283},//LSPD4
{284},//LSPD5
{285},//LSPD6
{288},//LSPD7
{76},//LSPD8
//============
{286},//FBI1
{163},//FBI2
{164},//FBI3
{165},//FBI4
{166},//FBI5
{141},//FBI6
//============
{287},//ArmySF1
{191},//ArmySF2
//============
{70},//Mediks1
{274},//Mediks2
{275},//Mediks3
{276},//Mediks4
{219},//Mediks5
//============
{223},//LCN1
{124},//LCN2
{113},//LCN3
{214},//LCN4
//============
{120},//YAKUZA1
{123},//YAKUZA3
{169},//YAKUZA2
{186},//YAKUZA4
//============
{57},//Goverment1
{150},//Goverment2
{98},//Goverment3
{187},//Goverment4
{147},//Goverment5
//============
{280},//SFPD1
{281},//SFPD2
{282},//SFPD3
{283},//SFPD4
{284},//SFPD5
{285},//SFPD6
{288},//SFPD7
{76},//SFPD8
//===========
{250},//SFNEWS1
{261},//SFNEWS2
{211},//SFNEWS3
{217},//SFNEWS4
//===========
{171},//Casino1
{11},//Casino2
//===========
{59},//Instructors1
{172},//Instructors2
{189},//Instructors3
{240},//Instructors4
//==========
{280},//LVPD1
{281},//LVPD2
{282},//LVPD3
{283},//LVPD4
{284},//LVPD5
{285},//LVPD6
{288},//LVPD7
{76},//LVPD8
//==========
{112},//RussianMafia1
{111},//RussianMafia2
{125},//RussianMafia4
{272},//RussianMafia3
{214},//RussianMafia5
//==========
{105},//GROOVE1
{106},//GROOVE2
{107},//GROOVE3
{269},//GROOVE4
{270},//GROOVE5
{271},//GROOVE6
//==========
{114},//Aztecas1
{115},//Aztecas2
{116},//Aztecas3
//==========
{102},//BALLAS1
{103},//BALLAS2
{104},//BALLAS3
//==========
{173},//RIFA1
{174},//RIFA2
{175},//RIFA3
//==========
{108},//VAGOS1
{109},//VAGOS2
{110},//VAGOS3
//==========
{287},//ArmyLV1
{191},//ArmyLV2
//==========
{250},//LSNEWS1
{261},//LSNEWS2
{211},//LSNEWS3
{217},//LSNEWS4
//==========
{287},//PED1
{287},//PED2
{191},//PED3
{287},//PED4
{287},//PED5
{191},//PED6
{287},//PED7
{200},//PED8
{230},//PED9
{137},//PED10
{212},//PED11
{79},//PED12
{78},//PED13
{96},//PED14
{90},//PED15
{55},//PED16
//==========
{247},//Bikers1
{248},//Bikers2
{254},//Bikers3
{298},//Bikers4
{201}//Bikers5
};
Если ты хочешь делать с -1 так делай на 1 ид больше при смене значения.

Пример:
case 1:if (SelectCharPlace[playerid] < 1) SelectCharPlace[playerid] = 9;
case 2:if (SelectCharPlace[playerid] < 9) SelectCharPlace[playerid] = 15;
case 3:if (SelectCharPlace[playerid] < 15) SelectCharPlace[playerid] = 17;


И если ты делаешь только 1 скин, то делай так:


static const JoinPed[110] =
{
{280},//LSPD1
{281},//LSPD2
{282},//LSPD3
{283},//LSPD4
{284},//LSPD5
{285},//LSPD6
{288},//LSPD7
{76},//LSPD8
//============
{286},//FBI1
{163},//FBI2
{164},//FBI3
{165},//FBI4
{166},//FBI5
{141},//FBI6
//============
{287},//ArmySF1
{191},//ArmySF2
//============
{70},//Mediks1
{274},//Mediks2
{275},//Mediks3
{276},//Mediks4
{219},//Mediks5
//============
{223},//LCN1
{124},//LCN2
{113},//LCN3
{214},//LCN4
//============
{120},//YAKUZA1
{123},//YAKUZA3
{169},//YAKUZA2
{186},//YAKUZA4
//============
{57},//Goverment1
{150},//Goverment2
{98},//Goverment3
{187},//Goverment4
{147},//Goverment5
//============
{280},//SFPD1
{281},//SFPD2
{282},//SFPD3
{283},//SFPD4
{284},//SFPD5
{285},//SFPD6
{288},//SFPD7
{76},//SFPD8
//===========
{250},//SFNEWS1
{261},//SFNEWS2
{211},//SFNEWS3
{217},//SFNEWS4
//===========
{171},//Casino1
{11},//Casino2
//===========
{59},//Instructors1
{172},//Instructors2
{189},//Instructors3
{240},//Instructors4
//==========
{280},//LVPD1
{281},//LVPD2
{282},//LVPD3
{283},//LVPD4
{284},//LVPD5
{285},//LVPD6
{288},//LVPD7
{76},//LVPD8
//==========
{112},//RussianMafia1
{111},//RussianMafia2
{125},//RussianMafia4
{272},//RussianMafia3
{214},//RussianMafia5
//==========
{105},//GROOVE1
{106},//GROOVE2
{107},//GROOVE3
{269},//GROOVE4
{270},//GROOVE5
{271},//GROOVE6
//==========
{114},//Aztecas1
{115},//Aztecas2
{116},//Aztecas3
//==========
{102},//BALLAS1
{103},//BALLAS2
{104},//BALLAS3
//==========
{173},//RIFA1
{174},//RIFA2
{175},//RIFA3
//==========
{108},//VAGOS1
{109},//VAGOS2
{110},//VAGOS3
//==========
{287},//ArmyLV1
{191},//ArmyLV2
//==========
{250},//LSNEWS1
{261},//LSNEWS2
{211},//LSNEWS3
{217},//LSNEWS4
//==========
{287},//PED1
{287},//PED2
{191},//PED3
{287},//PED4
{287},//PED5
{191},//PED6
{287},//PED7
{200},//PED8
{230},//PED9
{137},//PED10
{212},//PED11
{79},//PED12
{78},//PED13
{96},//PED14
{90},//PED15
{55},//PED16
//==========
{247},//Bikers1
{248},//Bikers2
{254},//Bikers3
{298},//Bikers4
{201}//Bikers5
};

и используй без [0] т.е JoinPed[...]

и еще vovandolg его не слушай он видима сам не знает, что говорит.

vovandolg
21.01.2016, 19:27
Я просто сделал уже так и между этими двумя вариантами не вижу очень большой разницы:grin:
Есть но не большая..