04.09.2013, 15:38
It's spelled "state" not "statse". You have that callback already, just copy:
and paste them into OnPlayerStateChange callback (Ctrl + F to find it if you want, type in the box "OnPlayerStateChange" and hit enter).
It will just look like that:
pawn Код:
// The below lines
if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 427 )
{
SetPlayerArmour( playerid, 100.0 );
}
It will just look like that:
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 427 )
{
SetPlayerArmour( playerid, 100.0 );
}
// Some other code you had..
return 1;
}