Thought this would work. But I have errors.
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(IsPlayerInAnyVehicle(playerid) && oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) && PlayerIsInDM[playerid] == false)
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 999999.0);
}
if(IsPlayerInAnyVehicle(playerid) && oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) && PlayerIsInDM[playerid] == true)
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
}
return 1;
}
Код:
C:\DOCUME~1\User\Desktop\MYNEWE~1\GAMEMO~1\SU.pwn(14436) : error 029: invalid expression, assumed zero
C:\DOCUME~1\User\Desktop\MYNEWE~1\GAMEMO~1\SU.pwn(14436) : warning 215: expression has no effect
C:\DOCUME~1\User\Desktop\MYNEWE~1\GAMEMO~1\SU.pwn(14436) : error 001: expected token: ";", but found ")"
C:\DOCUME~1\User\Desktop\MYNEWE~1\GAMEMO~1\SU.pwn(14436) : error 029: invalid expression, assumed zero
C:\DOCUME~1\User\Desktop\MYNEWE~1\GAMEMO~1\SU.pwn(14436) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
the line that has the errors is this line.
pawn Код:
if(IsPlayerInAnyVehicle(playerid) && oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) && PlayerIsInDM[playerid] == false)