IsPlayerInAnyVehicle not running
#1

So, none of this code under runs, any ideas why?
PHP код:
  else if(Character[hitid][BrutalM] == && playerid != INVALID_PLAYER_ID && IsPlayerInAnyVehicle(hitid))
           {
            
GetPlayerPos(hitidBMPos[hitid][0], BMPos[hitid][1], BMPos[hitid][2]);
            
RemovePlayerFromVehicle(hitid);
            
SetPlayerPos(hitidBMPos[hitid][0], BMPos[hitid][1], BMPos[hitid][2] + 2);
            
Character[hitid][BrutalM] = 1;
            
Character[hitid][CanAccept] = 0;
            
LegHit[hitid] = 0;
            
ApplyAnim(hitid);
            
format(DTextSsizeof(DTextS), "(( %s is currently injured, type /damages %i for more info. ))"GetName(hitid), hitid);
            
label[hitid] = Create3DTextLabel(DTextSCOLOR_REDBMPos[hitid][0], BMPos[hitid][1], BMPos[hitid][2], 10.00);
            
Attach3DTextLabelToPlayer(label[hitid], hitid000.7);
            
ClearPlayerWeapons(hitid);
            
format(strsizeof(str),"%s was brutally wounded by %s.",GetRoleplayName(hitid),GetRoleplayName(playerid));
            
SetTimerEx("AllowDamage"1200false"i"hitid);
            
SendAdminsMessage(1COLOR_REDstr);
            if(
Character[hitid][Level] <= 10)
            {
                
DeathB RandomEx(100500);
                
GivePlayerMoney(hitid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(hitidCOLOR_LIGHTPINKDeathS);
                
SCM(hitidCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(hitidCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
            else if(
Character[hitid][Level] <= 20 && Character[hitid][Level] > 10)
            {
                
DeathB RandomEx(100750);
                
GivePlayerMoney(hitid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(hitidCOLOR_LIGHTPINKDeathS);
                
SCM(hitidCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(hitidCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
            else if(
Character[hitid][Level] <= 30 && Character[hitid][Level] > 20)
            {
                
DeathB RandomEx(1001250);
                
GivePlayerMoney(hitid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(hitidCOLOR_LIGHTPINKDeathS);
                
SCM(hitidCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(hitidCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
            else if(
Character[hitid][Level] > 30)
            {
                
DeathB RandomEx(1001500);
                
GivePlayerMoney(hitid, -DeathB);
                
format(DeathSsizeof(DeathS), "EMT: Your Medical bills are $%i."DeathB);
                
SCM(hitidCOLOR_LIGHTPINKDeathS);
                
SCM(hitidCOLOR_LIGHTRED"You were brutally wounded, now if a medic or anyone else doesn't save you, you'll die.");
                
SCM(hitidCOLOR_LIGHTRED"To accept death type /acceptdeath");
            }
        }
    } 
Reply
#2

Run this code before the if statements:
printf("BrutalM is: %i, playerid is: %i, and player is in a car is: (%i)", Character[hitid][BrutalM], playerid, IsPlayerInAnyVehicle(hitid));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)