Ко всем #define если нет
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
В public OnPlayerKeyStateChange
if(PRESSED(KEY_HANDBRAKE))
{
switch(random(6))
{
case 0: SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
case 1: SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
case 2: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
case 3: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
case 4: SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
case 5: SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
}
}
Теперь игрок будет драться сразу всеми стиля боя!
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
В public OnPlayerKeyStateChange
if(PRESSED(KEY_HANDBRAKE))
{
switch(random(6))
{
case 0: SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
case 1: SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
case 2: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
case 3: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
case 4: SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
case 5: SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
}
}
Теперь игрок будет драться сразу всеми стиля боя!
Последнее редактирование модератором: