OnVehicleDamageStatusUpdate help!
#1

I get this!
Код:
./includes/callbacks.pwn(6792) : warning 202: number of arguments does not match definition
./includes/callbacks.pwn(6798) : error 017: undefined symbol "Panel"
./includes/callbacks.pwn(6798) : error 001: expected token: ";", but found "]"
./includes/callbacks.pwn(6798) : error 029: invalid expression, assumed zero
./includes/callbacks.pwn(6798) : fatal error 107: too many error messages on one line
PHP код:
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
    new 
panelsdoorslightstiresFloat:speed GetPlayerSpeed(playeridtrue);
    foreach (
Player,i)
    {
        if(
IsPlayerConnected(i) && GetPlayerVehicleID(i) == vehicleid)
        {
            
GetVehicleDamageStatus(GetPlayerVehicleID(playerid),panels,doors,lights,tires);
            if(
PlayerVehicleInfo[GetPlayerVehicleID(playerid)][Panel] != panels || VehicleInfo[GetPlayerVehicleID(playerid)][Doors] != doors)
            {
                if(
speed >= 60.0)
                {
                    new 
Float:health;
                    
GetPlayerHealth(i,health);
                    switch(
GetPVarInt(i"Seatbelt"))
                    {
                        case 
0:
                        {
                            
SetPlayerHealth(i,health-20.0);
                        }
                        case 
1:
                        {
                            
SetPlayerHealth(i,health-1.0);
                        }
                    }
                }
            }
        }
    }
    return 
true;

Reply
#2

Where you have the enum for the PlayerVehicleInfo, add this: Panel
Reply
#3

Quote:
Originally Posted by Lucky13
Посмотреть сообщение
Where you have the enum for the PlayerVehicleInfo, add this: Panel
My bad i forgot that thanks dude
Reply
#4

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
My bad i forgot that thanks dude
No problem!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)