Я смотрю вы гуманитарий!
Разделив 9 на 8 мы получаем 1.125, а умножив это дело на 8 мы получаем, вы не поверите, 9. То же самое с 18: 18 / 8 = 2.25 2.25 * 8 = 18 А для того что бы ваша арифметика соответствовала вашей логике вам надо брать целую часть от деления! |
Ну посмотрите же код, ну. Там ведётся работа с целыми числами и остатком от деления. Я подумал, можно догадаться, что я имею ввиду деление не "float" чисел, а "int". Всё работает, я проверил. Любое (хотя все 512 проверять я не стал) указанное число выдаёт такой же цвет, как на странице.
|
Нет же. От порядкового номера цвета отнимается уже просчитанная часть.
Допустим, цвет с номером 9. Разделив на 8 получаем 1, т.е. сколько раз нужно прибавить 0x220000, затем умножаем обратно эту 1 на 8 и отнимаем от 9, остаётся 1, т.е. сколько раз нужно прибавить 0x2200. Либо цвет 18. Разделив на 8 получаем 2, т.е., опять же, сколько раз нужно прибавить 0x220000, затем умножаем 2 на 8 и отнимаем из 18, остаётся 2, т.е. сколько раз нужно прибавить 0x2200. Да, в целом кривовато, но я не очень силён в махинациях с шест. числами. |
Как тогда сделать "логично"? Сменить всем переменным тип на float и потом floatround() юзать?
|
public OnGameModeInit() {
for (new i; i < 500;) {
printf("%06x", ++i);
}
return 1;
}
[13:28:34] 000001 [13:28:34] 000002 [13:28:34] 000003 [13:28:34] 000004 [13:28:34] 000005 [13:28:34] 000006 [13:28:34] 000007 [13:28:34] 000008 [13:28:34] 000009 [13:28:34] 00000A [13:28:34] 00000B [13:28:34] 00000C [13:28:34] 00000D [13:28:34] 00000E [13:28:34] 00000F [13:28:34] 000010 [13:28:34] 000011 [13:28:34] 000012 [13:28:34] 000013 [13:28:34] 000014 [13:28:34] 000015 [13:28:34] 000016 [13:28:34] 000017 [13:28:34] 000018 [13:28:34] 000019 [13:28:34] 00001A [13:28:34] 00001B [13:28:34] 00001C [13:28:34] 00001D [13:28:34] 00001E [13:28:34] 00001F [13:28:34] 000020 [13:28:34] 000021 [13:28:34] 000022 [13:28:34] 000023 [13:28:34] 000024 [13:28:34] 000025 [13:28:34] 000026 [13:28:34] 000027 [13:28:34] 000028 [13:28:34] 000029 [13:28:34] 00002A [13:28:34] 00002B [13:28:34] 00002C [13:28:34] 00002D [13:28:34] 00002E [13:28:34] 00002F [13:28:34] 000030 [13:28:34] 000031 [13:28:34] 000032 [13:28:34] 000033 [13:28:34] 000034 [13:28:34] 000035 [13:28:34] 000036 [13:28:34] 000037 [13:28:34] 000038 [13:28:34] 000039 [13:28:34] 00003A [13:28:34] 00003B [13:28:34] 00003C [13:28:34] 00003D [13:28:34] 00003E [13:28:34] 00003F [13:28:34] 000040 [13:28:34] 000041 [13:28:34] 000042 [13:28:34] 000043 [13:28:34] 000044 [13:28:34] 000045 [13:28:34] 000046 [13:28:34] 000047 [13:28:34] 000048 [13:28:34] 000049 [13:28:34] 00004A [13:28:34] 00004B [13:28:34] 00004C [13:28:34] 00004D [13:28:34] 00004E [13:28:34] 00004F [13:28:34] 000050 [13:28:34] 000051 [13:28:34] 000052 [13:28:34] 000053 [13:28:34] 000054 [13:28:34] 000055 [13:28:34] 000056 [13:28:34] 000057 [13:28:34] 000058 [13:28:34] 000059 [13:28:34] 00005A [13:28:34] 00005B [13:28:34] 00005C [13:28:34] 00005D [13:28:34] 00005E [13:28:34] 00005F [13:28:34] 000060 [13:28:34] 000061 [13:28:34] 000062 [13:28:34] 000063 [13:28:34] 000064 [13:28:34] 000065 [13:28:34] 000066 [13:28:34] 000067 [13:28:34] 000068 [13:28:34] 000069 [13:28:34] 00006A [13:28:34] 00006B [13:28:34] 00006C [13:28:34] 00006D [13:28:34] 00006E [13:28:34] 00006F [13:28:34] 000070 [13:28:34] 000071 [13:28:34] 000072 [13:28:34] 000073 [13:28:34] 000074 [13:28:34] 000075 [13:28:34] 000076 [13:28:34] 000077 [13:28:34] 000078 [13:28:34] 000079 [13:28:34] 00007A [13:28:34] 00007B [13:28:34] 00007C [13:28:34] 00007D [13:28:34] 00007E [13:28:34] 00007F [13:28:34] 000080 [13:28:34] 000081 [13:28:34] 000082 [13:28:34] 000083 [13:28:34] 000084 [13:28:34] 000085 [13:28:34] 000086 [13:28:34] 000087 [13:28:34] 000088 [13:28:34] 000089 [13:28:34] 00008A [13:28:34] 00008B [13:28:34] 00008C [13:28:34] 00008D [13:28:34] 00008E [13:28:34] 00008F [13:28:34] 000090 [13:28:34] 000091 [13:28:34] 000092 [13:28:34] 000093 [13:28:34] 000094 [13:28:34] 000095 [13:28:34] 000096 [13:28:34] 000097 [13:28:34] 000098 [13:28:34] 000099 [13:28:34] 00009A [13:28:34] 00009B [13:28:34] 00009C [13:28:34] 00009D [13:28:34] 00009E [13:28:34] 00009F [13:28:34] 0000A0 [13:28:34] 0000A1 [13:28:34] 0000A2 [13:28:34] 0000A3 [13:28:34] 0000A4 [13:28:34] 0000A5 [13:28:34] 0000A6 [13:28:34] 0000A7 [13:28:34] 0000A8 [13:28:34] 0000A9 [13:28:34] 0000AA [13:28:34] 0000AB [13:28:34] 0000AC [13:28:34] 0000AD [13:28:34] 0000AE [13:28:34] 0000AF [13:28:34] 0000B0 [13:28:34] 0000B1 [13:28:34] 0000B2 [13:28:34] 0000B3 [13:28:34] 0000B4 [13:28:34] 0000B5 [13:28:34] 0000B6 [13:28:34] 0000B7 [13:28:34] 0000B8 [13:28:34] 0000B9 [13:28:34] 0000BA [13:28:34] 0000BB [13:28:34] 0000BC [13:28:34] 0000BD [13:28:34] 0000BE [13:28:34] 0000BF [13:28:34] 0000C0 [13:28:34] 0000C1 [13:28:34] 0000C2 [13:28:34] 0000C3 [13:28:34] 0000C4 [13:28:34] 0000C5 [13:28:34] 0000C6 [13:28:34] 0000C7 [13:28:34] 0000C8 [13:28:34] 0000C9 [13:28:34] 0000CA [13:28:34] 0000CB [13:28:34] 0000CC [13:28:34] 0000CD [13:28:34] 0000CE [13:28:34] 0000CF [13:28:34] 0000D0 [13:28:34] 0000D1 [13:28:34] 0000D2 [13:28:34] 0000D3 [13:28:34] 0000D4 [13:28:34] 0000D5 [13:28:34] 0000D6 [13:28:34] 0000D7 [13:28:34] 0000D8 [13:28:34] 0000D9 [13:28:34] 0000DA [13:28:34] 0000DB [13:28:34] 0000DC [13:28:34] 0000DD [13:28:34] 0000DE [13:28:34] 0000DF [13:28:34] 0000E0 [13:28:34] 0000E1 [13:28:34] 0000E2 [13:28:34] 0000E3 [13:28:34] 0000E4 [13:28:34] 0000E5 [13:28:34] 0000E6 [13:28:34] 0000E7 [13:28:34] 0000E8 [13:28:34] 0000E9 [13:28:34] 0000EA [13:28:34] 0000EB [13:28:34] 0000EC [13:28:34] 0000ED [13:28:34] 0000EE [13:28:34] 0000EF [13:28:34] 0000F0 [13:28:34] 0000F1 [13:28:34] 0000F2 [13:28:34] 0000F3 [13:28:34] 0000F4 [13:28:34] 0000F5 [13:28:34] 0000F6 [13:28:34] 0000F7 [13:28:34] 0000F8 [13:28:34] 0000F9 [13:28:34] 0000FA [13:28:34] 0000FB [13:28:34] 0000FC [13:28:34] 0000FD [13:28:34] 0000FE [13:28:34] 0000FF [13:28:34] 000100 [13:28:34] 000101 [13:28:34] 000102 [13:28:34] 000103 [13:28:34] 000104 [13:28:34] 000105 [13:28:34] 000106 [13:28:34] 000107 [13:28:34] 000108 [13:28:34] 000109 [13:28:34] 00010A [13:28:34] 00010B [13:28:34] 00010C [13:28:34] 00010D [13:28:34] 00010E [13:28:34] 00010F [13:28:34] 000110 [13:28:34] 000111 [13:28:34] 000112 [13:28:34] 000113 [13:28:34] 000114 [13:28:34] 000115 [13:28:34] 000116 [13:28:34] 000117 [13:28:34] 000118 [13:28:34] 000119 [13:28:34] 00011A [13:28:34] 00011B [13:28:34] 00011C [13:28:34] 00011D [13:28:34] 00011E [13:28:34] 00011F [13:28:34] 000120 [13:28:34] 000121 [13:28:34] 000122 [13:28:34] 000123 [13:28:34] 000124 [13:28:34] 000125 [13:28:34] 000126 [13:28:34] 000127 [13:28:34] 000128 [13:28:34] 000129 [13:28:34] 00012A [13:28:34] 00012B [13:28:34] 00012C [13:28:34] 00012D [13:28:34] 00012E [13:28:34] 00012F [13:28:34] 000130 [13:28:34] 000131 [13:28:34] 000132 [13:28:34] 000133 [13:28:34] 000134 [13:28:34] 000135 [13:28:34] 000136 [13:28:34] 000137 [13:28:34] 000138 [13:28:34] 000139 [13:28:34] 00013A [13:28:34] 00013B [13:28:34] 00013C [13:28:34] 00013D [13:28:34] 00013E [13:28:34] 00013F [13:28:34] 000140 [13:28:34] 000141 [13:28:34] 000142 [13:28:34] 000143 [13:28:34] 000144 [13:28:34] 000145 [13:28:34] 000146 [13:28:34] 000147 [13:28:34] 000148 [13:28:34] 000149 [13:28:34] 00014A [13:28:34] 00014B [13:28:34] 00014C [13:28:34] 00014D [13:28:34] 00014E [13:28:34] 00014F [13:28:34] 000150 [13:28:34] 000151 [13:28:34] 000152 [13:28:34] 000153 [13:28:34] 000154 [13:28:34] 000155 [13:28:34] 000156 [13:28:34] 000157 [13:28:34] 000158 [13:28:34] 000159 [13:28:34] 00015A [13:28:34] 00015B [13:28:34] 00015C [13:28:34] 00015D [13:28:34] 00015E [13:28:34] 00015F [13:28:34] 000160 [13:28:34] 000161 [13:28:34] 000162 [13:28:34] 000163 [13:28:34] 000164 [13:28:34] 000165 [13:28:34] 000166 [13:28:34] 000167 [13:28:34] 000168 [13:28:34] 000169 [13:28:34] 00016A [13:28:34] 00016B [13:28:34] 00016C [13:28:34] 00016D [13:28:34] 00016E [13:28:34] 00016F [13:28:34] 000170 [13:28:34] 000171 [13:28:34] 000172 [13:28:34] 000173 [13:28:34] 000174 [13:28:34] 000175 [13:28:34] 000176 [13:28:34] 000177 [13:28:34] 000178 [13:28:34] 000179 [13:28:34] 00017A [13:28:34] 00017B [13:28:34] 00017C [13:28:34] 00017D [13:28:34] 00017E [13:28:34] 00017F [13:28:34] 000180 [13:28:34] 000181 [13:28:34] 000182 [13:28:34] 000183 [13:28:34] 000184 [13:28:34] 000185 [13:28:34] 000186 [13:28:34] 000187 [13:28:34] 000188 [13:28:34] 000189 [13:28:34] 00018A [13:28:34] 00018B [13:28:34] 00018C [13:28:34] 00018D [13:28:34] 00018E [13:28:34] 00018F [13:28:34] 000190 [13:28:34] 000191 [13:28:34] 000192 [13:28:34] 000193 [13:28:34] 000194 [13:28:34] 000195 [13:28:34] 000196 [13:28:34] 000197 [13:28:34] 000198 [13:28:34] 000199 [13:28:34] 00019A [13:28:34] 00019B [13:28:34] 00019C [13:28:34] 00019D [13:28:34] 00019E [13:28:34] 00019F [13:28:34] 0001A0 [13:28:34] 0001A1 [13:28:34] 0001A2 [13:28:34] 0001A3 [13:28:34] 0001A4 [13:28:34] 0001A5 [13:28:34] 0001A6 [13:28:34] 0001A7 [13:28:34] 0001A8 [13:28:34] 0001A9 [13:28:34] 0001AA [13:28:34] 0001AB [13:28:34] 0001AC [13:28:34] 0001AD [13:28:34] 0001AE [13:28:34] 0001AF [13:28:34] 0001B0 [13:28:34] 0001B1 [13:28:34] 0001B2 [13:28:34] 0001B3 [13:28:34] 0001B4 [13:28:34] 0001B5 [13:28:34] 0001B6 [13:28:34] 0001B7 [13:28:34] 0001B8 [13:28:34] 0001B9 [13:28:34] 0001BA [13:28:34] 0001BB [13:28:34] 0001BC [13:28:34] 0001BD [13:28:34] 0001BE [13:28:34] 0001BF [13:28:34] 0001C0 [13:28:34] 0001C1 [13:28:34] 0001C2 [13:28:34] 0001C3 [13:28:34] 0001C4 [13:28:34] 0001C5 [13:28:34] 0001C6 [13:28:34] 0001C7 [13:28:34] 0001C8 [13:28:34] 0001C9 [13:28:34] 0001CA [13:28:34] 0001CB [13:28:34] 0001CC [13:28:34] 0001CD [13:28:34] 0001CE [13:28:34] 0001CF [13:28:34] 0001D0 [13:28:34] 0001D1 [13:28:34] 0001D2 [13:28:34] 0001D3 [13:28:34] 0001D4 [13:28:34] 0001D5 [13:28:34] 0001D6 [13:28:34] 0001D7 [13:28:34] 0001D8 [13:28:34] 0001D9 [13:28:34] 0001DA [13:28:34] 0001DB [13:28:34] 0001DC [13:28:34] 0001DD [13:28:34] 0001DE [13:28:34] 0001DF [13:28:34] 0001E0 [13:28:34] 0001E1 [13:28:34] 0001E2 [13:28:34] 0001E3 [13:28:34] 0001E4 [13:28:34] 0001E5 [13:28:34] 0001E6 [13:28:34] 0001E7 [13:28:34] 0001E8 [13:28:34] 0001E9 [13:28:34] 0001EA [13:28:34] 0001EB [13:28:34] 0001EC [13:28:34] 0001ED [13:28:34] 0001EE [13:28:34] 0001EF [13:28:34] 0001F0 [13:28:34] 0001F1 [13:28:34] 0001F2 [13:28:34] 0001F3 [13:28:34] 0001F4
Логично - вставить массив и ВСЁ! Игрок будет набирать цифру - это будет индексом цвета в массиве (от 0 до 510).
|
Да у меня так и было всегда. Мне надоел этот здоровенный массив даже не тем, что он в коде много места занимает, а сам факт того, что можно ведь его короче записать, а я не записываю. Отголоски перфекционизма.
|
new params[2][15] = {"PED","IDLE_CHAT"};
ApplyAnimation(playerid,params[0],params[1],8.1,0,1,1,1,1);
1.
Тут все верно. Крашит сервер или игру? 2. Покажите код загрузки и пример файла дома. |
Никто не задавался таким вопросом? Могут ли разрабы сделать отключение худа? НУ очень надо.
|
Нет. Это позволит скриптерам изменять атмосферу GTA San Andreas
|
Много раз у них просили же. Они отвечали, что хотят оставить самп именно San Andreas Multiplayer, т.е. чтобы из игры не делали другую игру с заменой моделей и интерфейса.
|
CMD:pick(playerid) { Veh[GetVehicleID(playerid)][Pickup] = CreatePickup(19131,23,x,y,z); // сами координаты непричем return 1; }
OnVehicleSpawn(vehicleid) { DestroyPickup(vehicleid][Pickup]); //скрываем сам пикап Veh[vehicleid][Pickup] = 0; // * return 1; }