if(PlayerRangeOfPoint(playerid, x,y,z)
{
return 1;
}
Ezzel nem fogsz neki segíteni, fõleg, hogy hibás. Helyesen:if(PlayerRangeOfPoint(playerid, x,y,z)
{
return 1;
}
cseréld le az X,Y,Z t a kordinátára, ameikre azt szeretnéd, hogy adjon nitrót.
Majd írd be a funkciókat.
IsPlayerInRangeOfPoint
Gondoltam hogy nem lesz jó. Hibát nem ír csak kiírja hogy a pawno leállt 2 gépen is ezt csinálja.Ilyen hiba a pawnoba? Nem csak szimplán lusta vagy megírni? Vagy nemtudod?
Úgy kell hogy annál a helynél ha ott van kapjon nem paranccsal hanem csak a puszta ott léttel.
public OnPlayerUpdate( playerid )
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 3167.33887, -2020.75598, 31.00000 ) )
{
if( !IsPlayerInInvalidNosVehicle( playerid, GetPlayerVehicleID( playerid ) ) )
{
AddVehicleComponent( GetPlayerVehicleID( playerid ), 1010 );
}
}
else
{
RemoveVehicleComponent( GetPlayerVehicleID( playerid ), 1010 );
}
return 1;
}
stock IsPlayerInInvalidNosVehicle( playerid, iVehID )
{
new
iInvalidNosVehicles[ 29 ] =
{
581,523,462,521,463,522,461,448,468,586,
509,481,510,472,473,493,595,484,430,453,
452,446,454,590,569,537,538,570,449
};
iVehID = GetPlayerVehicleID(playerid);
if( IsPlayerInVehicle( playerid, iVehID ) )
{
for( new i = 0; i < 29; i++ )
{
if( GetVehicleModel( iVehID ) == iInvalidNosVehicles[ i ] )
{
return 1;
}
}
}
return 0;
}